From ec911dc8b96a6cceac2a6582679528f2d599cb32 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Thu, 5 Jun 2014 15:21:05 -0400 Subject: ClutterStage: Replace clutter_stage_set_paint_callback() with ::after-paint signal clutter_stage_set_paint_callback() has the disadvantage that it only works for a single caller, and subsequent callers will overwrite and break previous callers. Replace it with an ::after-paint signal that is emitted at the same point - after all painting for the stage is completed but before the drawing is presented to the screen. https://bugzilla.gnome.org/show_bug.cgi?id=732342 --- tests/conform/actor-offscreen-limit-max-size.c | 6 ++---- tests/conform/actor-shader-effect.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/conform/actor-offscreen-limit-max-size.c b/tests/conform/actor-offscreen-limit-max-size.c index 1d17789fe..943c7d8a7 100644 --- a/tests/conform/actor-offscreen-limit-max-size.c +++ b/tests/conform/actor-offscreen-limit-max-size.c @@ -75,10 +75,8 @@ actor_offscreen_limit_max_size (void) return; data.stage = clutter_test_get_stage (); - clutter_stage_set_paint_callback (CLUTTER_STAGE (data.stage), - check_results, - &data, - NULL); + g_signal_connect (data.stage, "after-paint", + G_CALLBACK (check_results), &data); clutter_actor_set_size (data.stage, STAGE_WIDTH, STAGE_HEIGHT); data.actor_group1 = clutter_actor_new (); diff --git a/tests/conform/actor-shader-effect.c b/tests/conform/actor-shader-effect.c index 632caf689..37da929c5 100644 --- a/tests/conform/actor-shader-effect.c +++ b/tests/conform/actor-shader-effect.c @@ -271,10 +271,8 @@ actor_shader_effect (void) clutter_actor_show (stage); was_painted = FALSE; - clutter_stage_set_paint_callback (CLUTTER_STAGE (stage), - paint_cb, - &was_painted, - NULL); + g_signal_connect (stage, "after-paint", + G_CALLBACK (paint_cb), NULL); while (!was_painted) g_main_context_iteration (NULL, FALSE); -- cgit v1.2.1