fix(electrobun): skip window drag when click is within 8px resize border zone
This commit is contained in:
parent
a814e39410
commit
94a8e4072d
1 changed files with 3 additions and 0 deletions
|
|
@ -95,6 +95,9 @@
|
|||
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;
|
||||
// Delegate to GTK — the WM handles everything (smooth, zero CPU)
|
||||
appRpc.request['window.beginMove']({
|
||||
button: e.button + 1, // DOM: 0=left, GTK: 1=left
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue