[gtk+/wip/frame-synchronization: 25/33] GdkPaintClockIdle: don't start the tiemout/idle when in a frame
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/frame-synchronization: 25/33] GdkPaintClockIdle: don't start the tiemout/idle when in a frame
- Date: Tue, 4 Dec 2012 18:00:08 +0000 (UTC)
commit ad2bcfacabd086dec04abb6792d76f40e8407f3a
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Wed Nov 14 13:26:13 2012 -0500
GdkPaintClockIdle: don't start the tiemout/idle when in a frame
Don't start the idle if we're in the middle of painting a frame -
this will prevent us from getting the timing right when starting
the idle after the frame.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
gdk/gdkpaintclockidle.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkpaintclockidle.c b/gdk/gdkpaintclockidle.c
index 2b3bae5..e3131f3 100644
--- a/gdk/gdkpaintclockidle.c
+++ b/gdk/gdkpaintclockidle.c
@@ -46,6 +46,8 @@ struct _GdkPaintClockIdlePrivate
GdkPaintClockPhase requested;
GdkPaintClockPhase phase;
+
+ guint in_paint_idle : 1;
};
static gboolean gdk_paint_clock_flush_idle (void *data);
@@ -170,6 +172,7 @@ maybe_start_idle (GdkPaintClockIdle *clock_idle)
}
if (priv->paint_idle_id == 0 &&
+ !priv->in_paint_idle &&
(priv->requested & ~GDK_PAINT_CLOCK_PHASE_FLUSH_EVENTS) != 0)
{
priv->paint_idle_id = gdk_threads_add_timeout_full (GDK_PRIORITY_REDRAW,
@@ -217,6 +220,7 @@ gdk_paint_clock_paint_idle (void *data)
gboolean skip_to_resume_events;
priv->paint_idle_id = 0;
+ priv->in_paint_idle = TRUE;
skip_to_resume_events =
(priv->requested & ~(GDK_PAINT_CLOCK_PHASE_FLUSH_EVENTS | GDK_PAINT_CLOCK_PHASE_RESUME_EVENTS)) == 0;
@@ -299,7 +303,10 @@ gdk_paint_clock_paint_idle (void *data)
g_signal_emit_by_name (G_OBJECT (clock), "resume-events");
}
- priv->phase = GDK_PAINT_CLOCK_PHASE_NONE;
+ if (priv->freeze_count == 0)
+ priv->phase = GDK_PAINT_CLOCK_PHASE_NONE;
+
+ priv->in_paint_idle = FALSE;
if (priv->freeze_count == 0 && priv->requested != 0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]