fix(electrobun): GTK FFI direct resize via gtk_window_resize/move
Electrobun's setSize respects WebView min-size constraint. Bypass it with direct gtk_window_resize() + gtk_window_move() FFI calls. clearMinSizeTree() runs on every resize frame to suppress WebView re-propagation. gtkSetFrame() exported as new RPC endpoint.
This commit is contained in:
parent
e6635e436c
commit
fd2f626c20
3 changed files with 39 additions and 1 deletions
|
|
@ -148,7 +148,8 @@
|
|||
if (resizeEdge.includes('s')) height = Math.max(MIN_H, height + dy);
|
||||
if (resizeEdge.includes('n')) { const nh = Math.max(MIN_H, height - dy); y += height - nh; height = nh; }
|
||||
|
||||
appRpc.request['window.setFrame']({ x: Math.round(x), y: Math.round(y), width: Math.round(width), height: Math.round(height) }).catch(() => {});
|
||||
// Use GTK FFI directly — bypasses Electrobun's setSize which respects WebView min-size
|
||||
appRpc.request['window.gtkSetFrame']({ x: Math.round(x), y: Math.round(y), width: Math.round(width), height: Math.round(height) }).catch(() => {});
|
||||
}
|
||||
|
||||
function onResizeEnd() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue