[gtk/wip/matthiasc/popup2: 17/90] widget: Use the new idle sizer
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup2: 17/90] widget: Use the new idle sizer
- Date: Sat, 23 Mar 2019 13:37:32 +0000 (UTC)
commit 7bb100067cebc36a091c636b904573ccb984bd55
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 46f8eb7f45..b5c4e8c7e3 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -55,6 +55,7 @@
#include "gtkprivate.h"
#include "gtkrenderbackgroundprivate.h"
#include "gtkrenderborderprivate.h"
+#include "gtkrootprivate.h"
#include "gtkscrollable.h"
#include "gtkselection.h"
#include "gtksettingsprivate.h"
@@ -3673,8 +3674,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);
@@ -3694,8 +3695,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);
@@ -11515,9 +11516,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]