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 699633 - GtkWindow: critical messages when negative size allocations
GtkWindow: critical messages when negative size allocations
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-05-03 21:02 UTC by Sébastien Wilmet
Modified: 2013-05-04 23:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkWindow: bug fix about negative size allocation (1.23 KB, patch)
2013-05-03 21:04 UTC, Sébastien Wilmet
none Details | Review

Description Sébastien Wilmet 2013-05-03 21:02:42 UTC
I sometimes get critical messages about negative size allocation.

I've found the origin of the bug, a patch is coming soon.
Comment 1 Sébastien Wilmet 2013-05-03 21:04:11 UTC
Created attachment 243247 [details] [review]
GtkWindow: bug fix about negative size allocation

border_width is a guint.

If the width is 1 and the border_width is also 1, the result is normally
MAX (1, -1) = 1.

But instead here is what happened:
MAX (1, 4294967295) = 4294967295 --> cast to gint --> -1