widget: Skip popovers in allocation

Native widgets get allocated via their surface,
so can skip them here. This avoids criticals when
re-mapping a popover for the second time, as can
be seen e.g. in the 'Selections' demo in gtk4-demo.
This commit is contained in:
Matthias Clasen 2023-03-08 13:36:42 -05:00
parent a2d14632de
commit 2f273ba76a

View File

@ -3889,7 +3889,8 @@ gtk_widget_ensure_allocate_on_children (GtkWidget *widget)
child != NULL;
child = _gtk_widget_get_next_sibling (child))
{
gtk_widget_ensure_allocate (child);
if (gtk_widget_should_layout (child))
gtk_widget_ensure_allocate (child);
}
}