Eliminate the warning Allocating size to GtkWindow without calling gtk_widget_get_preferred_size/height



I am seeing this warning when expanding a TreeStore when the expanded height exceeds the size of the window.  I'm attaching a minimal but complete program that exhibits this.

If there's something I'm missing, I'd appreciate anu pointers, but it seems that this is a bug of sorts.  I've Googled this and saw some cases where it was a bug in the application programming, and were corrected, but most of these programs do explicitly allocate the size.

In the attached file, I did nothing to attempt to resize the window (the warning definitely refers to the toplevel window).

This occurs on all the systems on which I've tried it - Windows compiled under MinGW, Debian testing, Arch Linux, Linux Mint, and Ubuntu.  All these systems have some flavor of Gtk 3.22.

Also note that on my tests, if List 2 (the lower iter) is expanded first and the expanded size does not exceed the height of the window, and then List 1 is expanded, the warning is not displayed.

Seemingly, this is only a harmless warning, but it is a bit disconcerting to see it.  FWIW, even Glade (at least v 3.20) emits this warning when the widget hierarchy is expanded.

Attachment: test.c
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]