[mutter] tests/wayland-unit-tests: Clean up toplevel_apply_limits() signal handler



commit 41e426af10dfd1b285a232661a0fd2c5b965da3e
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Tue Sep 7 10:34:04 2021 +0200

    tests/wayland-unit-tests: Clean up toplevel_apply_limits() signal handler
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1993>

 src/tests/wayland-unit-tests.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/tests/wayland-unit-tests.c b/src/tests/wayland-unit-tests.c
index 03bab12a1f..3a73b9e548 100644
--- a/src/tests/wayland-unit-tests.c
+++ b/src/tests/wayland-unit-tests.c
@@ -241,14 +241,17 @@ static void
 toplevel_apply_limits (void)
 {
   ApplyLimitData data = {};
+  gulong handler_id;
 
   data.loop = g_main_loop_new (NULL, FALSE);
   data.wayland_test_client = wayland_test_client_new ("xdg-apply-limits");
-  g_signal_connect (test_driver, "sync-point", G_CALLBACK (on_sync_point), &data);
+  handler_id = g_signal_connect (test_driver, "sync-point",
+                                 G_CALLBACK (on_sync_point), &data);
   g_main_loop_run (data.loop);
   g_assert_cmpint (data.state, ==, APPLY_LIMIT_STATE_FINISH);
   wayland_test_client_finish (data.wayland_test_client);
   g_test_assert_expected_messages ();
+  g_signal_handler_disconnect (test_driver, handler_id);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]