From d690e744d51e2a373d9c3cc01e0089bae8cf84ef Mon Sep 17 00:00:00 2001 From: yaojin Date: Thu, 20 Aug 2026 22:54:38 -0700 Subject: [PATCH] fix(windows-titlebar): extend drag region to full titlebar height 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 --- src/preload/windows-titlebar.ts | 2 +- test/windows-titlebar.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preload/windows-titlebar.ts b/src/preload/windows-titlebar.ts index 5e5d9d48..92990375 100644 --- a/src/preload/windows-titlebar.ts +++ b/src/preload/windows-titlebar.ts @@ -362,7 +362,7 @@ const titlebarStyles = ` position: absolute; top: 0; right: 44px; - height: 5px; + height: ${WINDOWS_TITLEBAR_HEIGHT}px; left: var(${SIDEBAR_WIDTH_PROPERTY}, 280px); pointer-events: auto; -webkit-app-region: drag; diff --git a/test/windows-titlebar.test.ts b/test/windows-titlebar.test.ts index 044ebc12..b1f01981 100644 --- a/test/windows-titlebar.test.ts +++ b/test/windows-titlebar.test.ts @@ -33,7 +33,7 @@ describe('Windows titlebar menu', () => { expect(preload).toContain("document.documentElement.style.setProperty(SIDEBAR_WIDTH_PROPERTY") expect(preload).toContain('background: transparent') expect(preload).toContain('.safeArea::before') - expect(preload).toContain('height: 5px') + expect(preload).toContain('height: ${WINDOWS_TITLEBAR_HEIGHT}px') expect(preload).toContain('body.dsh-desktop-windows-titlebar-layout > #root') expect(preload).toContain('-webkit-app-region: drag') expect(preload).toContain('-webkit-app-region: no-drag')