GNOME Bugzilla – Bug 602298
The GtkWindow properties 'default-height' and 'default-width' cannot be set to 0
Last modified: 2013-02-04 01:31:43 UTC
According to the documentation the 'default-height' and 'default-width' properties can take the value 0. But when we set this value, the function g_object_get() returns 1 instead of 0
Created attachment 148039 [details] This is the code showing the bug This is the code showing the bug
Also reported at http://linuxtesting.org/results/report?num=D0142
Comment on attachment 148039 [details] This is the code showing the bug changing the mime type
I think the documentation is quite clear about that: "if the default size does not obey the geometry hints for the window (gtk_window_set_geometry_hints() can be used to set these explicitly), the default size will be clamped to the nearest permitted size." And even more exactly "Windows can't actually be 0x0 in size, they must be at least 1x1, but passing 0 for width and height is OK, resulting in a 1x1 default size."
(In reply to comment #4) > I think the documentation is quite clear about that: > > "if the default size does not obey the geometry hints for the window > (gtk_window_set_geometry_hints() can be used to set these explicitly), the > default size will be clamped to the nearest permitted size." > > And even more exactly > > "Windows can't actually be 0x0 in size, they must be at least 1x1, but passing > 0 for width and height is OK, resulting in a 1x1 default size." So it would be better to change the documentation and don't confuse developers with 0 value, because as you mentioned windows can't be 0 sized and 0 has no any special meaning.