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 617444 - GNU emacs warnings with extended layout GTK+
GNU emacs warnings with extended layout GTK+
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.20.x
Other Linux
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
EL
Depends on:
Blocks:
 
 
Reported: 2010-05-02 14:01 UTC by Xan Lopez
Modified: 2010-06-15 18:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes negative size allocations (1.40 KB, patch)
2010-06-15 16:19 UTC, Tristan Van Berkom
none Details | Review
Fixes negative size allocations #2 (1.76 KB, patch)
2010-06-15 18:33 UTC, Tristan Van Berkom
none Details | Review

Description Xan Lopez 2010-05-02 14:01:53 UTC
After updating to GTK+ trunk, GNU emacs 23.1.1 will print this or similar after start up:

(emacs:20632): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 656 and height -68

The result is that some text isn't shown in the buffers, and the different windows are weirdly sized in some cases.
Comment 1 Javier Jardón (IRC: jjardon) 2010-05-02 16:24:52 UTC
Confirmed here with latest GTK+ -> Version: 2.20
Comment 2 Tristan Van Berkom 2010-06-15 16:19:10 UTC
Created attachment 163693 [details] [review]
Fixes negative size allocations

This patch fixes the negative allocation warnings that have
been present since the new extended layout code.

I've confirmed by applying this patch to a rewind state of GTK+
that it fixes the problem for emacs startup.

It also fixes the problem for gedit running against GTK+ master.
Comment 3 Matthias Clasen 2010-06-15 16:58:02 UTC
We should probably try to figure out why size goes negative there, but the fix looks ok in any case.
Comment 4 Tristan Van Berkom 2010-06-15 18:33:34 UTC
Created attachment 163710 [details] [review]
Fixes negative size allocations #2

Ok this one essentially does the same but more gracefully.

Now we just check that there is some 'size' to distribute
before needlessly entering the loop body.

Seemingly it happens in some cases that the box is allocated
less space than it needs to fit its children.
Comment 5 Tristan Van Berkom 2010-06-15 18:49:41 UTC
Fixed in master, closing.