[gtk/wip/otte/matthiasc/popup2: 3/92] widget: Use the new idle sizer



commit 4b9f893608e0e7d78736cc495837816f84aa18d3
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 9d0dccc665..48aad588f1 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"
@@ -3723,8 +3724,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);
 
@@ -3744,8 +3745,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);
 
@@ -11800,9 +11801,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]