Skip to content

fix(windows-titlebar): extend drag region to full titlebar height - #129

Merged
yaojin3616 merged 1 commit into
mainfrom
agent/debugger/01a022e0
Aug 21, 2026
Merged

fix(windows-titlebar): extend drag region to full titlebar height#129
yaojin3616 merged 1 commit into
mainfrom
agent/debugger/01a022e0

Conversation

@yaojin3616

Copy link
Copy Markdown
Contributor

Summary

Fix the Windows titlebar drag region so the visible top strip becomes draggable again.

The injected .safeArea::before drag 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 shared WINDOWS_TITLEBAR_HEIGHT constant so the drag region matches the overlay.

Root cause

src/preload/windows-titlebar.ts:365 set the height of the drag region to a hard-coded 5px. The rest of the 36px title-bar strip was no-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::before height to WINDOWS_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.
  • Full npm test suite: 160 passing; 11 failing tests are unrelated *patch.test.ts tests that require patch-package to populate vendored module sources (skipped here because I installed with --ignore-scripts to avoid running native postinstall steps). They do not touch this change.

Related

Fixes #121

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
@yaojin3616
yaojin3616 merged commit 6d7b823 into main Aug 21, 2026
3 of 4 checks passed
@yaojin3616
yaojin3616 deleted the agent/debugger/01a022e0 branch August 21, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Windows] Window cannot be dragged by the title bar (drag region only 5px tall)

1 participant