Changing the visibility of GtkToolBar contents causes allocation warnings
Submitted by Kai Willadsen
Created attachment 333780 Simple python test case
Reproduced against the current 3.20.x branch HEAD. This is a new regression as of GTK+ 3.20.
The attached test case just shows a GtkToolButton in an idle handler, which triggers the following warning:
(toolbar-item-size.py:23245): Gtk-WARNING **: Allocating size to GtkToolButton 0x55f514e1c270 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
There's no visible effect of this on the rendering of the toolbar or its items that I've noticed.
However, there is a more serious side-effect, which is that it (somehow, I have no idea how) causes some GtkRange manipulations in a container with a shared GtkGrid parent to do the wrong thing. I do appreciate how bizarre this sounds. My test case is to trigger this warning in Meld and then see GtkTextView.scroll_to_mark() calls silently fail to actually scroll the mark on-screen.
Attachment 333780, "Simple python test case":