After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 104514 - gtk_window_set_resizable(...) incomplete
gtk_window_set_resizable(...) incomplete
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.2.x
Other other
: Normal normal
: Small fix
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-01-27 09:11 UTC by Martyn Russell
Modified: 2005-11-09 13:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martyn Russell 2003-01-27 09:11:00 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.
Comment 1 Tor Lillqvist 2003-01-29 02:31:40 UTC
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?
Comment 2 Matthias Clasen 2003-06-10 09:57:29 UTC
Move remaining bugs off 2.2.2 target milestone.
Comment 3 Matthias Clasen 2003-08-27 08:06:24 UTC
Move remaining bugs off the 2.2.3 milestone
Comment 4 Daniel Atallah 2005-02-04 03:12:13 UTC
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.
Comment 5 Tor Lillqvist 2005-11-09 13:01:49 UTC
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.