diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2014-06-05 15:21:05 -0400 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2014-06-27 14:39:02 -0400 |
commit | ec911dc8b96a6cceac2a6582679528f2d599cb32 (patch) | |
tree | 8600199199c9b049fce247a30d11213499319cab /tests | |
parent | 9c74b983100c5eb6e4b7d5921371f66b5965a434 (diff) | |
download | clutter-ec911dc8b96a6cceac2a6582679528f2d599cb32.tar.gz |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/conform/actor-offscreen-limit-max-size.c | 6 | ||||
-rw-r--r-- | tests/conform/actor-shader-effect.c | 6 |
2 files changed, 4 insertions, 8 deletions
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); |