From c4545cc5d47364b66b7ecd7bb482210fb8c8655a Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Wed, 3 Oct 2012 19:38:40 -0400 Subject: GdkFrameClock: Make the phase explicit when requesting the frame Instead of having gdk_frame_clock_request_frame() have gdk_frame_clock_request_phase() where we can say what phase we need. This allows us to know if we get a frame-request during layout whether it's just a request for drawing from the layout, or whether another layout phase is needed. https://bugzilla.gnome.org/show_bug.cgi?id=685460 --- gtk/gtkcontainer.c | 6 ++++-- gtk/gtkwidget.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'gtk') diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 938887ea14..e73ef2a700 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -1686,7 +1686,8 @@ gtk_container_idle_sizer (GdkFrameClock *clock, } else { - gdk_frame_clock_request_frame (clock); + gdk_frame_clock_request_phase (clock, + GDK_FRAME_CLOCK_PHASE_LAYOUT); } } @@ -1705,7 +1706,8 @@ gtk_container_start_idle_sizer (GtkContainer *container) container->priv->resize_clock = clock; container->priv->resize_handler = g_signal_connect (clock, "layout", G_CALLBACK (gtk_container_idle_sizer), container); - gdk_frame_clock_request_frame (clock); + gdk_frame_clock_request_phase (clock, + GDK_FRAME_CLOCK_PHASE_LAYOUT); } static void diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index e1cf124f68..63fbcae40b 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -4793,7 +4793,7 @@ gtk_widget_queue_resize_no_redraw (GtkWidget *widget) * then update the animation by calling * gdk_frame_clock_get_frame_time() again during each repaint. * - * gdk_frame_clock_request_frame() will result in a new frame on the + * gdk_frame_clock_request_phase() will result in a new frame on the * clock, but won't necessarily repaint any widgets. To repaint a * widget, you have to use gtk_widget_queue_draw() which invalidates * the widget (thus scheduling it to receive a draw on the next -- cgit v1.2.1