[Bug] Size allocation error with GtkPopoverMenuBar
Steps to reproduce
- Build minimal example (attached) with GTK=4.5.1 (the error seems to be related to the inclusion of a
GtkPopoverMenuBar
) - Run minimal example
- An error is observed
Current behavior
An error of the form
(main:245224): Gtk-CRITICAL **: 01:18:27.368: gtk_widget_measure: assertion 'for_size >= -1' failed
is observed
Expected outcome
No error
Version information
GTK 4.5.1 (build from sources, commit de42b5bf)
Manjaro Linux (21.2.0) + KDE (5.88.0)
Configured with gtk_doc=true
Additional information
I am reporting this due to https://discourse.gnome.org/t/bug-strange-size-allocation-warnings-with-gtkpopovermenubar/8412.
A minimal example is attached. This should just create a GtkApplicationWindow
containing a button and a GtkPopoverMenuBar
initialised from a GMenuModel
created using a GtkBuilder
from a GResource
.
The example can be built with:
$ glib-compile-resources --generate-source --target=resources.c program.gresource.xml
$ clang -o main main.c resources.c `pkg-config --cflags --libs gtk4`
Many thanks for your time!
Edited by hiornso