Gtk4 Win32: crushed widgets + criticals when iconifying a maximized window
Steps to reproduce
- Install latest mingw-w64-gtk4 under MSYS2-UCRT64
- Start
gtk4-widget-factory
from ucrt64 shell - Maximize the window
- Iconify/deiconify (repeat for each of the 3 pages)
Current behavior
At some point a bunch of warning should appear in the console (see below).
Some widgets may have different sizes after deiconify (typically GtkPaned resizable children will shrink to their smallest size).
Expected outcome
No warnings, widgets keep the same size.
Version information
- mingw-w64-gtk4-4.10.1-1
- Windows 10
Additional information
Here a log I got today:
$ gtk4-widget-factory
(gtk4-widget-factory.exe:10660): Gtk-WARNING **: 16:26:47.267: gtk_widget_size_allocate(): attempt to allocate GtkWindowHandle windowhandle 0000020909354f80 with width -11 and height 46
(gtk4-widget-factory.exe:10660): Gtk-CRITICAL **: 16:26:47.267: gtk_widget_measure: assertion 'for_size >= -1' failed
(gtk4-widget-factory.exe:10660): Gtk-WARNING **: 16:26:47.267: gtk_widget_size_allocate(): attempt to allocate GtkLabel label 000002090c0aa6b0 with width 100 and height -22
(gtk4-widget-factory.exe:10660): Gtk-CRITICAL **: 16:26:47.267: gtk_widget_measure: assertion 'for_size >= -1' failed
(gtk4-widget-factory.exe:10660): Gtk-WARNING **: 16:26:47.267: gtk_widget_size_allocate(): attempt to allocate GtkLabel label 000002090c0abdf0 with width 100 and height -22
(gtk4-widget-factory.exe:10660): Gtk-CRITICAL **: 16:26:47.267: gtk_widget_measure: assertion 'for_size >= -1' failed
(gtk4-widget-factory.exe:10660): Gtk-WARNING **: 16:26:47.267: gtk_widget_size_allocate(): attempt to allocate GtkLabel label 000002090c0a81e0 with width 100 and height -22
(gtk4-widget-factory.exe:10660): Gtk-WARNING **: 16:26:47.267: gtk_widget_size_allocate(): attempt to allocate GtkToggleButton button 00000209075ff980 with width 36 and height -12
(gtk4-widget-factory.exe:10660): Gtk-CRITICAL **: 16:26:47.267: gtk_widget_measure: assertion 'for_size >= -1' failed
(gtk4-widget-factory.exe:10660): Gtk-CRITICAL **: 16:26:47.267: gtk_widget_measure: assertion 'for_size >= -1' failed
(gtk4-widget-factory.exe:10660): Gtk-WARNING **: 16:26:47.267: gtk_widget_size_allocate(): attempt to allocate GtkBox box 000002090b14cd40 with width -12 and height -10
(gtk4-widget-factory.exe:10660): Gtk-WARNING **: 16:26:47.267: gtk_widget_size_allocate(): attempt to allocate GtkImage image 0000020915ed3ee0 with width 16 and height -26
(gtk4-widget-factory.exe:10660): Gtk-WARNING **: 16:26:47.267: gtk_widget_size_allocate(): attempt to allocate GtkImage image 0000020915ed50c0 with width 16 and height -26
(gtk4-widget-factory.exe:10660): Gtk-WARNING **: 16:26:47.267: gtk_widget_size_allocate(): attempt to allocate GtkImage image 0000020915ed8e80 with width 16 and height -26
(gtk4-widget-factory.exe:10660): Gtk-WARNING **: 16:26:47.267: gtk_widget_size_allocate(): attempt to allocate GtkBox box 000002090b14de70 with width -19 and height -66
(gtk4-widget-factory.exe:10660): Gtk-WARNING **: 16:26:47.276: gtk_widget_size_allocate(): attempt to allocate GtkBox box 000002090b14de70 with width -19 and height -66
Seems Win32 only, can't reproduce the issue on Linux.
Edited by gwillems