fix(electrobun): enable window resize via recursive GTK min-size override

Root cause: WebKitWebView requests min_size = content_size (5120x1387 on
ultrawide), which GTK propagates to WM_NORMAL_HINTS, blocking all resize.

Fix: recursively walk the GTK widget tree (GtkWindow → GtkBin → WebView)
and call gtk_widget_set_size_request(-1, -1) on every widget. Then set
gtk_window_set_geometry_hints with min=400x300.

Result: WM_NORMAL_HINTS now shows min=10x10, window is fully resizable.
This commit is contained in:
Hibryda 2026-03-25 12:53:24 +01:00
parent 9da9d96ebd
commit d84feb6c67
3 changed files with 134 additions and 10 deletions

View file

@ -618,16 +618,16 @@
height: 100vh;
}
/* ── Resize handles ─────────────────────────────────── */
.rz { position: fixed; z-index: 9999; }
.rz-n { top: 0; left: 4px; right: 4px; height: 4px; cursor: n-resize; }
.rz-s { bottom: 0; left: 4px; right: 4px; height: 4px; cursor: s-resize; }
.rz-e { right: 0; top: 4px; bottom: 4px; width: 4px; cursor: e-resize; }
.rz-w { left: 0; top: 4px; bottom: 4px; width: 4px; cursor: w-resize; }
.rz-ne { top: 0; right: 0; width: 8px; height: 8px; cursor: ne-resize; }
.rz-nw { top: 0; left: 0; width: 8px; height: 8px; cursor: nw-resize; }
.rz-se { bottom: 0; right: 0; width: 8px; height: 8px; cursor: se-resize; }
.rz-sw { bottom: 0; left: 0; width: 8px; height: 8px; cursor: sw-resize; }
/* ── Resize handles — 6px edges, 12px corners, fixed on viewport ── */
.rz { position: fixed; z-index: 9999; background: rgba(255,0,0,0.15); }
.rz-n { top: 0; left: 12px; right: 12px; height: 6px; cursor: n-resize; }
.rz-s { bottom: 0; left: 12px; right: 12px; height: 6px; cursor: s-resize; }
.rz-e { right: 0; top: 12px; bottom: 12px; width: 6px; cursor: e-resize; }
.rz-w { left: 0; top: 12px; bottom: 12px; width: 6px; cursor: w-resize; }
.rz-ne { top: 0; right: 0; width: 12px; height: 12px; cursor: ne-resize; }
.rz-nw { top: 0; left: 0; width: 12px; height: 12px; cursor: nw-resize; }
.rz-se { bottom: 0; right: 0; width: 12px; height: 12px; cursor: se-resize; }
.rz-sw { bottom: 0; left: 0; width: 12px; height: 12px; cursor: sw-resize; }
.app-shell {
flex: 1;