tests/monitor-unit-tests: Set up async waiter after X11 client

We'll have two persistent client connections alive for the whole test,
one X11 client, and one Wayland client. So in order to be able to set up
the async waiter, do so after setting up the X11 client, as after that
we know we'll have a MetaX11Display ready to use.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1681>
This commit is contained in:
Jonas Ådahl 2021-01-22 09:53:24 +01:00 committed by Marge Bot
parent 798fc63755
commit ff25ec3f36

View File

@ -178,11 +178,6 @@ create_monitor_test_clients (void)
{
GError *error = NULL;
test_wait_for_x11_display ();
meta_x11_display_set_alarm_filter (meta_get_display ()->x11_display,
monitor_tests_alarm_filter, NULL);
wayland_monitor_test_client = test_client_new (WAYLAND_TEST_CLIENT_NAME,
META_WINDOW_CLIENT_TYPE_WAYLAND,
&error);
@ -195,6 +190,9 @@ create_monitor_test_clients (void)
if (!x11_monitor_test_client)
g_error ("Failed to launch X11 test client: %s", error->message);
meta_x11_display_set_alarm_filter (meta_get_display ()->x11_display,
monitor_tests_alarm_filter, NULL);
if (!test_client_do (wayland_monitor_test_client, &error,
"create", WAYLAND_TEST_CLIENT_WINDOW,
NULL))