You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Linux] Implement Window::SetResizable without breaking programmatic resizing #56
Window::SetResizable() is a stub on Linux (src/platform/linux/window_linux.cpp), so setResizable(false) does nothing there.
Implementing it with gtk_window_set_resizable() runs into a known GTK behaviour: a non-resizable GtkWindow is sized from its default size or size request, so later SetSize() / SetContentSize() calls stop taking effect. The implementation needs to keep programmatic resizing working while the user can't resize. One option is to pin min = max size hints to the requested size instead of toggling resizable, or to update the default size together with the size.
Background, from window_manager (moving onto nativeapi in 0.6.0):
SetResizable() / IsResizable() now use GTK's resizable property. To avoid the GTK fixed-size trap, disabling resize first sets the default size to the current size, and SetSize / SetContentSize update the default size while the window is non-resizable. So programmatic grow and shrink still work, toggling keeps the current size, and #55's min/max limits survive the toggle. IsResizable() reads the native property.
Verified with window_resizable_linux_test on GNOME: Wayland 54 checks, Xwayland 66. Cases covered: CSD and SSD, empty windows, and disabling before or after mapping. window_resizable_desktop_test confirms the same behaviour on macOS and Windows (32 checks each); no changes were needed there.
Activity
lijy91 commentedon Sep 22, 2026
Fixed in 10ac6fe.
SetResizable()/IsResizable()now use GTK'sresizableproperty. To avoid the GTK fixed-size trap, disabling resize first sets the default size to the current size, andSetSize/SetContentSizeupdate the default size while the window is non-resizable. So programmatic grow and shrink still work, toggling keeps the current size, and #55's min/max limits survive the toggle.IsResizable()reads the native property.Verified with
window_resizable_linux_teston GNOME: Wayland 54 checks, Xwayland 66. Cases covered: CSD and SSD, empty windows, and disabling before or after mapping.window_resizable_desktop_testconfirms the same behaviour on macOS and Windows (32 checks each); no changes were needed there.Linux: resizable, window controls and restoring minimized windows