[gtk/wip/matthiasc/popup4: 5/106] widget: Use the new idle sizer
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup4: 5/106] widget: Use the new idle sizer
- Date: Wed, 24 Apr 2019 11:37:41 +0000 (UTC)
commit 43fae28f1d75af082c6e3a8458797c53d65bfb28
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 ab33790cb2..362f6605ac 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"
@@ -3557,8 +3558,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);
@@ -3578,8 +3579,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);
@@ -11951,9 +11952,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]