fix(windows-titlebar): extend drag region to full titlebar height - #129
Merged
Conversation
The injected .safeArea::before drag region was only 5px tall while the titlebar overlay is 36px, leaving the visible top strip non-draggable on Windows. Use the shared WINDOWS_TITLEBAR_HEIGHT constant so the drag region matches the overlay. Fixes #121
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the Windows titlebar drag region so the visible top strip becomes draggable again.
The injected
.safeArea::beforedrag region was only 5px tall while the titlebar overlay is 36px tall, leaving the visible top strip non-draggable on Windows. This PR changes it to use the sharedWINDOWS_TITLEBAR_HEIGHTconstant so the drag region matches the overlay.Root cause
src/preload/windows-titlebar.ts:365set the height of the drag region to a hard-coded5px. The rest of the 36px title-bar strip wasno-drag, so the visible header area could not be used to move the window. (Note: this only affected Windows; the macOS path injects a 24px drag region separately.)Changes
src/preload/windows-titlebar.ts— set.safeArea::beforeheight toWINDOWS_TITLEBAR_HEIGHT(36px), matching the titlebar overlay.test/windows-titlebar.test.ts— update the corresponding assertion.Verification
npm test -- test/windows-titlebar.test.ts— 5/5 passing.npm testsuite: 160 passing; 11 failing tests are unrelated*patch.test.tstests that requirepatch-packageto populate vendored module sources (skipped here because I installed with--ignore-scriptsto avoid running native postinstall steps). They do not touch this change.Related
Fixes #121