[clutter: 1/11] x11/stage: Use symbolic constants for source function



commit 71323b8bfc942a20952c2152485ed0f23b5a834f
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Jan 25 23:17:42 2012 +0000

    x11/stage: Use symbolic constants for source function
    
    And make sure to use the clutter_threads_add_timeout(), so that the
    function is called under the Clutter lock.

 clutter/x11/clutter-stage-x11.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c
index 861b6b6..fb2385e 100644
--- a/clutter/x11/clutter-stage-x11.c
+++ b/clutter/x11/clutter-stage-x11.c
@@ -904,7 +904,7 @@ clipped_redraws_cool_off_cb (void *data)
 
   stage_x11->clipped_redraws_cool_off = 0;
 
-  return FALSE;
+  return G_SOURCE_REMOVE;
 }
 
 static ClutterTranslateReturn
@@ -993,8 +993,9 @@ clutter_stage_x11_translate_event (ClutterEventTranslator *translator,
                 g_source_remove (stage_x11->clipped_redraws_cool_off);
 
               stage_x11->clipped_redraws_cool_off =
-                g_timeout_add_seconds (1, clipped_redraws_cool_off_cb,
-                                       stage_x11);
+                clutter_threads_add_timeout (1000,
+                                             clipped_redraws_cool_off_cb,
+                                             stage_x11);
 
               /* Queue a relayout - we want glViewport to be called
                * with the correct values, and this is done in ClutterStage



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]