[gtk/wip/baedert/for-master: 53/56] widget: Only do a IS_ROOT type check if the parent is unset



commit 520d18f11e05bb86fd3ba1d32bfaa7bc3b3fb0f5
Author: Timm Bäder <mail baedert org>
Date:   Sun Apr 26 17:34:32 2020 +0200

    widget: Only do a IS_ROOT type check if the parent is unset
    
    So we do less type checks

 gtk/gtkwidget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 9988c6bdec..609dc2cdc8 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10429,7 +10429,7 @@ gtk_widget_set_alloc_needed (GtkWidget *widget)
       if (!priv->visible)
         break;
 
-      if (GTK_IS_ROOT (widget))
+      if (!priv->parent && GTK_IS_ROOT (widget))
         {
           gtk_root_start_layout (GTK_ROOT (widget));
           break;


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