[mutter] test-runner: Wait before finding MetaWindow when showing
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] test-runner: Wait before finding MetaWindow when showing
- Date: Fri, 5 Jun 2020 21:39:18 +0000 (UTC)
commit 8d84449941b189f9fe5d4be0a50699d3c6e00ddc
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Jun 5 00:03:00 2020 +0200
test-runner: Wait before finding MetaWindow when showing
A "show" command calls gtk_window_show() and gdk_display_sync(), then
returns. This means that the X11 window objects are guaranteed to have
been created in the X11 server.
After that, the test runner will look up the window's associated
MetaWindow and wait for it to be shown.
What this doesn't account for is if mutter didn't get enough CPU time to
see the new window. When this happens, the 'default-size' stacking test
sometimes failed after hiding and showing the X11 window.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1288
src/tests/test-runner.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/tests/test-runner.c b/src/tests/test-runner.c
index f1c605ad6d..577c4dcae7 100644
--- a/src/tests/test-runner.c
+++ b/src/tests/test-runner.c
@@ -572,6 +572,9 @@ test_case_do (TestCase *test,
if (!test_client_do (client, error, argv[0], window_id, NULL))
return FALSE;
+ if (!test_case_wait (test, error))
+ return FALSE;
+
MetaWindow *window = test_client_find_window (client, window_id, error);
if (!window)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]