From 71323b8bfc942a20952c2152485ed0f23b5a834f Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 25 Jan 2012 23:17:42 +0000 Subject: [PATCH] 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 file 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 -- 2.7.4