mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 12:52:14 +00:00
tests/kms/render: Disconnect signal in end of test case
Otherwise it'll get invoked in later test cases. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2417>
This commit is contained in:
parent
f76258b840
commit
5be555c59d
@ -49,18 +49,22 @@ meta_test_kms_render_basic (void)
|
||||
MetaBackend *backend = meta_context_get_backend (test_context);
|
||||
ClutterActor *stage = meta_backend_get_stage (backend);
|
||||
KmsRenderingTest test;
|
||||
gulong handler_id;
|
||||
|
||||
test = (KmsRenderingTest) {
|
||||
.number_of_frames_left = 10,
|
||||
.loop = g_main_loop_new (NULL, FALSE),
|
||||
};
|
||||
g_signal_connect (stage, "after-update", G_CALLBACK (on_after_update), &test);
|
||||
handler_id = g_signal_connect (stage, "after-update",
|
||||
G_CALLBACK (on_after_update), &test);
|
||||
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (stage));
|
||||
g_main_loop_run (test.loop);
|
||||
g_main_loop_unref (test.loop);
|
||||
|
||||
g_assert_cmpint (test.number_of_frames_left, ==, 0);
|
||||
|
||||
g_signal_handler_disconnect (stage, handler_id);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user