mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
widget: Allow invisible toplevels to do sizing operations
This is a quickfix to keep things working.
It turns out GtkWindow assumes it can do sizing operations while not
being visible, or while in the process of show()ing/hide()ing itself.
And commit b495ce54
broke these operations.
Figuring this properly requires some more thinking and restructuring on
my part, so for now we relax the requirement of visiblility enough for
these things to start working again.
This commit is contained in:
parent
78d91aaf9b
commit
154204e891
@ -268,7 +268,7 @@ _gtk_widget_compute_size_for_orientation (GtkWidget *widget,
|
||||
gpointer key;
|
||||
gint min_result = 0, nat_result = 0;
|
||||
|
||||
if (!gtk_widget_get_visible (widget))
|
||||
if (!gtk_widget_get_visible (widget) && !gtk_widget_is_toplevel (widget))
|
||||
{
|
||||
if (minimum)
|
||||
*minimum = 0;
|
||||
|
@ -4817,7 +4817,7 @@ gtk_widget_size_allocate (GtkWidget *widget,
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
if (!priv->visible)
|
||||
if (!priv->visible && !gtk_widget_is_toplevel (widget))
|
||||
return;
|
||||
|
||||
gtk_widget_push_verify_invariants (widget);
|
||||
|
Loading…
Reference in New Issue
Block a user