GNOME Bugzilla – Bug 104514
gtk_window_set_resizable(...) incomplete
Last modified: 2005-11-09 13:01:49 UTC
When calling gtk_window_set_resizable(GTK_WINDOW(window), FALSE) on windows, the window in question should: - not have the MAXIMISE button on the toolbar - not have the MAXIMISE option in the application menu - not have the RESIZE option in the application menu - not have the RESIZE drag icons when hovered over the edge of the window - not be able to double click on the titlebar to MAXIMISE. The gtk_window_set_resizable(...) function is used by glade (ver 2), which means gdk_window_set_decorations(...) function has to be used for each window to be set up correctly afterwards.
I would like policy input by Owen on this. Is it gtk_window_set_resizable()'s business to affect the decorations? (I.e. presumably it would trickle down to be the geometry hint handling in gdk/win32's business.) Do all X11 window managers modify the decoration buttons/resize handles/whatever based on geometry hints, too, not just explicit gdk_window_set_decorations() calls?
Move remaining bugs off 2.2.2 target milestone.
Move remaining bugs off the 2.2.3 milestone
This is still around in the 2.4.x Branch. It has the unwanted effect of allow the "maximize" button to be pressed (which causes the window to be moved to the top left corner, but stay the same size). I came across the following discussion on the gtk-app-devel-list: http://mail.gnome.org/archives/gtk-app-devel-list/2004-December/msg00369.html Which would seems to state pretty clearly that the WM should update decorations based on the resizeable flag.
Fixed in HEAD and gtk-2-8: 2005-11-09 Tor Lillqvist <tml@novell.com> * gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints): If we have identical minimum and maximum size hints, remove the resize and maximize decorations/functions. (#104514) If we have a maximum size hint, remove the maximize decoration/function but ensure the resize decoration/function is available. Otherwise ensure both resize and maximize decorations/functions are there. (set_or_clear_style_bits): Factored out common code from gdk_window_set_decorations() and gdk_window_set_functions(). Hack the window style setting once more: Only touch the window style bits corresponding to the GdkWMDecoration or GdkWMFunction parameter bitmasks. Hopefully this finally is the correct thing to do. We used to clear all other bits than those that were being set, or set all other bits than those that were being cleared. Take into account that adding or removing decorations leaves the window's outer size unchanged, i.e., the client area's size and position change. This is apparently not what we want, so change also the window's (outer) position and size appropriately so that the client area's position and size stay constant. gtk-demo's color selector dialog is now non-resizable like on X11 (I tested with metacity in GNOME). Torn off menus are shrinkable vertically but have a maximum size, and are not maximizable or minimizable, like on X11. (gdk_window_set_decorations, gdk_window_set_functions): Let set_or_clear_decorations() do most of the job.