]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkframeclockidle.c
GtkBubbleWindow: use OSD style class
[~andy/gtk] / gdk / gdkframeclockidle.c
index 7e1a8c17e642960da11e7eb21bfa77389a96735b..5901c7f6caf825dfd11a6f9dd216c4ebeef54810 100644 (file)
@@ -35,7 +35,7 @@
 #include <windows.h>
 #endif
 
-#define FRAME_INTERVAL 16667 // microseconds
+#define FRAME_INTERVAL 16667 /* microseconds */
 
 struct _GdkFrameClockIdlePrivate
 {
@@ -247,7 +247,8 @@ maybe_start_idle (GdkFrameClockIdle *clock_idle)
                                                               (GDestroyNotify) g_object_unref);
         }
 
-      if (priv->paint_idle_id == 0 && RUN_PAINT_IDLE (priv))
+      if (!priv->in_paint_idle &&
+         priv->paint_idle_id == 0 && RUN_PAINT_IDLE (priv))
         {
           priv->paint_idle_id = gdk_threads_add_timeout_full (GDK_PRIORITY_REDRAW,
                                                               min_interval,
@@ -364,7 +365,8 @@ gdk_frame_clock_paint_idle (void *data)
               /* We always emit ::before-paint and ::after-paint if
                * any of the intermediate phases are requested and
                * they don't get repeated if you freeze/thaw while
-               * in them. */
+               * in them.
+               */
               priv->requested &= ~GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT;
               g_signal_emit_by_name (G_OBJECT (clock), "before-paint");
               priv->phase = GDK_FRAME_CLOCK_PHASE_UPDATE;
@@ -439,7 +441,7 @@ gdk_frame_clock_paint_idle (void *data)
 #ifdef G_ENABLE_DEBUG
   if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
     {
-      if (timings->complete)
+      if (timings && timings->complete)
         _gdk_frame_clock_debug_print_timings (clock, timings);
     }
 #endif /* G_ENABLE_DEBUG */
@@ -546,7 +548,8 @@ gdk_frame_clock_idle_thaw (GdkFrameClock *clock)
       maybe_start_idle (clock_idle);
       /* If nothing is requested so we didn't start an idle, we need
        * to skip to the end of the state chain, since the idle won't
-       * run and do it for us. */
+       * run and do it for us.
+       */
       if (priv->paint_idle_id == 0)
         priv->phase = GDK_FRAME_CLOCK_PHASE_NONE;