[gtk/wip/matthiasc/popup4: 19/121] widget: Use the new idle sizer



commit 874bb9f20c6eab0ffd1c18f30e8c74d9311f5346
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Mar 17 00:37:33 2019 -0400

    widget: Use the new idle sizer

 gtk/gtkwidget.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index faf5318a95..7066305f95 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -56,6 +56,7 @@
 #include "gtkprivate.h"
 #include "gtkrenderbackgroundprivate.h"
 #include "gtkrenderborderprivate.h"
+#include "gtkrootprivate.h"
 #include "gtkscrollable.h"
 #include "gtkselection.h"
 #include "gtksettingsprivate.h"
@@ -3551,8 +3552,8 @@ gtk_widget_connect_frame_clock (GtkWidget *widget)
   GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
   GdkFrameClock *frame_clock;
 
-  if (GTK_IS_CONTAINER (widget) && _gtk_widget_is_toplevel (widget))
-    gtk_container_start_idle_sizer (GTK_CONTAINER (widget));
+  if (GTK_IS_ROOT (widget))
+    gtk_root_start_layout_phase (GTK_ROOT (widget));
 
   frame_clock = gtk_widget_get_frame_clock (widget);
 
@@ -3572,8 +3573,8 @@ gtk_widget_disconnect_frame_clock (GtkWidget *widget)
 {
   GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
 
-  if (GTK_IS_CONTAINER (widget) && _gtk_widget_is_toplevel (widget))
-    gtk_container_stop_idle_sizer (GTK_CONTAINER (widget));
+  if (GTK_IS_ROOT (widget))
+    gtk_root_stop_layout_phase (GTK_ROOT (widget));
 
   gtk_css_node_invalidate_frame_clock (priv->cssnode, FALSE);
 
@@ -11907,9 +11908,9 @@ gtk_widget_set_alloc_needed (GtkWidget *widget)
       if (!priv->visible)
         break;
 
-      if (_gtk_widget_is_toplevel (widget))
+      if (GTK_IS_ROOT (widget))
         {
-          gtk_container_start_idle_sizer (GTK_CONTAINER (widget));
+          gtk_root_start_layout_phase (GTK_ROOT (widget));
           break;
         }
 


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