diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2012-10-03 19:38:40 -0400 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2013-02-14 17:19:48 -0500 |
commit | c4545cc5d47364b66b7ecd7bb482210fb8c8655a (patch) | |
tree | 0afc69916a4fa8f865daa658ec91b78f82c10e1b /gtk | |
parent | 7753883add412a4bbc6b49b9bc7ef037c5a34c36 (diff) | |
download | gtk+-c4545cc5d47364b66b7ecd7bb482210fb8c8655a.tar.gz |
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
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkcontainer.c | 6 | ||||
-rw-r--r-- | gtk/gtkwidget.c | 2 |
2 files changed, 5 insertions, 3 deletions
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 |