diff --git a/ui-electrobun/src/mainview/App.svelte b/ui-electrobun/src/mainview/App.svelte index cb12bde..a461fdb 100644 --- a/ui-electrobun/src/mainview/App.svelte +++ b/ui-electrobun/src/mainview/App.svelte @@ -95,12 +95,17 @@ function onDragStart(e: MouseEvent) { const target = e.target as HTMLElement; if (target.tagName === 'BUTTON' || target.tagName === 'INPUT' || target.closest('button') || target.closest('.rz')) return; - // Don't drag if click is within the resize border zone (8px from any edge) - const B = 8; - if (e.clientX < B || e.clientY < B || e.clientX > window.innerWidth - B || e.clientY > window.innerHeight - B) return; + // Don't start drag if click is within resize border zone (10px from any window edge). + // The native C resize handler (on the WebView) needs these clicks. + // Also prevent drag near the sidebar's own edges to avoid overlap. + const B = 10; + const winW = window.innerWidth, winH = window.innerHeight; + if (e.clientX < B || e.clientY < B || e.clientX > winW - B || e.clientY > winH - B) { + return; // Let native resize handle this + } // Delegate to GTK — the WM handles everything (smooth, zero CPU) appRpc.request['window.beginMove']({ - button: e.button + 1, // DOM: 0=left, GTK: 1=left + button: e.button + 1, rootX: e.screenX, rootY: e.screenY, }).catch(() => {}); diff --git a/ui-electrobun/src/mainview/app.css b/ui-electrobun/src/mainview/app.css index 9e1048f..981f9ad 100644 --- a/ui-electrobun/src/mainview/app.css +++ b/ui-electrobun/src/mainview/app.css @@ -83,6 +83,7 @@ html, body { flex-direction: column; align-items: center; padding: 0.5rem 0; + padding-left: 10px; /* Leave space for native resize edge (8px + margin) */ gap: 0.25rem; }