Qt5 backend by snuk182 · Pull Request #1329 · webview/webview

and others added 17 commits

April 17, 2025 15:38
Removes some details about expected behavior of webview_set_size() due
to inconsistencies observed when using GTK 4.

The documentation states the following:

    GTK 4 can set a default/initial window size if done early enough;
    otherwise, this function has no effect. GTK 4 (unlike 3) can't
    resize a window after it has been set up.

Observations when calling webview_set_size() with WEBVIEW_HINT_NONE:

Ubuntu  | GTK     | Window  | Can set new size?
--      | ---     | ------- | -----------------
24.04.2 | 4.14.2  | X11     | If different from what was previously set
24.04.2 | 4.14.2  | Wayland | If user hasn't resized by hand
24.04.2 | 3.24.41 | X11     | Yes
24.04.2 | 3.24.41 | Wayland | Yes
22.04.5 | 4.6.9   | X11     | If different from what was previously set
22.04.5 | 4.6.9   | Wayland | Yes
22.04.5 | 3.24.33 | X11     | Yes
22.04.5 | 3.24.33 | Wayland | Yes
gtk_widget_set_size_request() was called when WEBVIEW_HINT_FIXED was
passed into webview_set_size(). That function is meant to set a minimum
size.

Instead we can call gtk_window_set_default_size() (GTK 4) or
gtk_window_resize() (GTK 3).

@plyhun

@plyhun

@plyhun

@plyhun

@plyhun