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 602298 - The GtkWindow properties 'default-height' and 'default-width' cannot be set to 0
The GtkWindow properties 'default-height' and 'default-width' cannot be set to 0
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-11-18 12:27 UTC by tigran
Modified: 2013-02-04 01:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This is the code showing the bug (836 bytes, text/plain)
2009-11-18 12:34 UTC, tigran
Details

Description tigran 2009-11-18 12:27:39 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
Comment 1 tigran 2009-11-18 12:34:49 UTC
Created attachment 148039 [details]
This is the code showing the bug

This is the code showing the bug
Comment 2 tigran 2009-11-18 12:36:15 UTC
Also reported at http://linuxtesting.org/results/report?num=D0142
Comment 3 Emmanuele Bassi (:ebassi) 2009-11-18 13:47:55 UTC
Comment on attachment 148039 [details]
This is the code showing the bug

changing the mime type
Comment 4 Christian Dywan 2009-11-18 14:25:04 UTC
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."
Comment 5 tigran 2010-01-13 06:55:23 UTC
(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.
Comment 6 tigran 2010-01-13 12:33:54 UTC
(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.