GNOME Bugzilla – Bug 617444
GNU emacs warnings with extended layout GTK+
Last modified: 2010-06-15 18:49:41 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.
Confirmed here with latest GTK+ -> Version: 2.20
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.
We should probably try to figure out why size goes negative there, but the fix looks ok in any case.
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.
Fixed in master, closing.