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
Window::SetMinimumSize() and Window::SetMaximumSize() are stubs on Linux (src/platform/linux/window_linux.cpp), so min/max size constraints set through nativeapi have no effect there. The getters return whatever was stored.
Expected: enforce the constraints with gtk_window_set_geometry_hints() (GDK_HINT_MIN_SIZE / GDK_HINT_MAX_SIZE), combined with the aspect-ratio hints that SetAspectRatio() already sets. Otherwise one call would overwrite the other's hints. Check that:
the constraints survive maximize → unmaximize
they apply when set before the window is mapped
they work with client-side decorations (the hints are in window-frame coordinates)
Background, from window_manager (which is moving onto nativeapi in 0.6.0):
Linux: min/max sizes are applied as GTK geometry hints and combined with SetAspectRatio, so setting one no longer clears the other. The public frame size is converted to the GDK surface (CSD shadows, server-side frames). Hints are refreshed after mapping and layout changes, deferred until GTK finishes its resize.
Windows (found while testing): WM_GETMINMAXINFO read the limits from the WindowRegistry wrapper, which may not be the instance that set them, so they could be silently ignored. The handler now reads the setter's state, and width and height can be bounded independently.
Verified with the new desktop tests (no synthetic input): window_size_constraints_linux_test on GNOME Wayland (36 checks), Xwayland (48), Xvfb/Openbox and Weston; window_size_constraints_windows_test on Windows (7). Also checked by hand with window_example (min 400×300, max 1000×700) on macOS, Windows and Linux.
Activity
lijy91 commentedon Sep 22, 2026
Fixed in 10ac6fe (Linux) and 4ef0521 (Windows + tests).
SetAspectRatio, so setting one no longer clears the other. The public frame size is converted to the GDK surface (CSD shadows, server-side frames). Hints are refreshed after mapping and layout changes, deferred until GTK finishes its resize.WM_GETMINMAXINFOread the limits from theWindowRegistrywrapper, which may not be the instance that set them, so they could be silently ignored. The handler now reads the setter's state, and width and height can be bounded independently.Verified with the new desktop tests (no synthetic input):
window_size_constraints_linux_teston GNOME Wayland (36 checks), Xwayland (48), Xvfb/Openbox and Weston;window_size_constraints_windows_teston Windows (7). Also checked by hand withwindow_example(min 400×300, max 1000×700) on macOS, Windows and Linux.Window size constraints on Linux and Windows
SetAspectRatio constrains the content area on every platform