Module: Roxane::Gtk

Extended by:
FFI::Library
Defined in:
lib/roxane/gtk.rb

Overview

Direct GTK3 bindings for window-size affordances the webview C API gets wrong on Wayland. libwebview 0.12 (GTK3) implements WEBVIEW_HINT_NONE with gtk_window_resize only; on Wayland that does not set the initial xdg geometry, so the client commits 200×200 and floating compositors (Hyprland, etc.) keep the tiny square. GNOME/Mutter is more forgiving, which hides the bug there. GTK4 webview already uses gtk_window_set_default_size — we do the same from Ruby, plus a brief size-request so the first map advertises the right min/geometry, then release it so the window stays user-resizable.

Where libgtk-3 isn't loadable (macOS/Windows — their backends are separate), AVAILABLE is false and callers no-op.