mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
test-texture-fbo: Disconnect the paint handler for the stage
Otherwise the paint handler will still be run for the subsequent tests. This ends up writing to the ‘state’ variable which used to be on the stack so it will end up corrupting some stack variable. This was causing test-cogl-premult to fail.
This commit is contained in:
parent
ce030a3fce
commit
ff1d9cf090
@ -180,6 +180,7 @@ test_texture_fbo (TestConformSimpleFixture *fixture,
|
||||
{
|
||||
TestState state;
|
||||
guint idle_source;
|
||||
gulong paint_handler;
|
||||
ClutterActor *actor;
|
||||
int ypos = 0;
|
||||
|
||||
@ -236,12 +237,15 @@ test_texture_fbo (TestConformSimpleFixture *fixture,
|
||||
* will trigger redrawing. */
|
||||
idle_source = g_idle_add (queue_redraw, state.stage);
|
||||
|
||||
g_signal_connect_after (state.stage, "paint", G_CALLBACK (on_paint), &state);
|
||||
paint_handler = g_signal_connect_after (state.stage, "paint",
|
||||
G_CALLBACK (on_paint), &state);
|
||||
|
||||
clutter_actor_show_all (state.stage);
|
||||
|
||||
clutter_main ();
|
||||
|
||||
g_signal_handler_disconnect (state.stage, paint_handler);
|
||||
|
||||
g_source_remove (idle_source);
|
||||
|
||||
/* Remove all of the actors from the stage */
|
||||
|
Loading…
Reference in New Issue
Block a user