[gtk/wip/matthiasc/popup4: 6/105] widget: Use the new idle sizer
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup4: 6/105] widget: Use the new idle sizer
- Date: Wed, 24 Apr 2019 04:40:04 +0000 (UTC)
commit a7b1ebbb05b57ed5a69281747e7e68dde41fae67
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 ed93a7ba20..c98964fca7 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"
@@ -3548,8 +3549,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);
@@ -3569,8 +3570,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);
@@ -11695,9 +11696,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]