fix(electrobun): use setPosition+setSize instead of setFrame, add resize throttle
This commit is contained in:
parent
cfb7dafa17
commit
48d32f6f28
2 changed files with 12 additions and 1 deletions
|
|
@ -144,8 +144,13 @@
|
|||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
let resizeThrottleId = 0;
|
||||
function onResizeMove(e: MouseEvent) {
|
||||
if (!isResizing || !resizeReady) return;
|
||||
// Throttle to ~30fps to avoid overwhelming GTK
|
||||
const now = Date.now();
|
||||
if (now - resizeThrottleId < 33) return;
|
||||
resizeThrottleId = now;
|
||||
const dx = e.screenX - resizeStartX;
|
||||
const dy = e.screenY - resizeStartY;
|
||||
let { x, y, width, height } = resizeFrame;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue