GNOME Bugzilla – Bug 755129
GtkStatusIcon: attempt to allocate widget with width -x and height y
Last modified: 2015-10-12 20:12:25 UTC
Created attachment 311503 [details] [review] gtktrayicon-x11: include padding in preferred width and height GtkStatusIcon might show following warning: gtk_widget_size_allocate(): attempt to allocate widget with width -3 and height 26. From my testing it looks like this negative width comes from: padding * 2 - 1. If padding is 2 then width is -3, if paddding is 10 then width will be -19. Fix this by setting preferred width or height minimum size to padding * 2.
The patch doesn't make sense to me, as is. Where is the padding incorporated in the size allocation ? That is where it should be taken into account for size requesting. Afaics, the padding only gets sent to the server side to apply padding outside the status icon.
(In reply to Matthias Clasen from comment #1) > The patch doesn't make sense to me, as is. Where is the padding incorporated > in the size allocation ? That is where it should be taken into account for > size requesting. > > Afaics, the padding only gets sent to the server side to apply padding > outside the status icon. Not sure if I understood correctly, but padding is used in GtkStatusIcon: https://git.gnome.org/browse/gtk+/tree/gtk/deprecated/gtkstatusicon.c#n1480 Does not this affect size allocation?
Still think that this is gtk+ bug, but since I added similar fix to gnome-panel and GtkStatusIcon is deprecated I will close this as WONTFIX.