tests/runner: Add 'sync_shown' command
This command will block until a previously asynchronously shown window is shown. E.g. show w/1 async ... do stuff .. sync_shown w/1 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554>
This commit is contained in:
parent
5c26d786f5
commit
e743334fe0
@ -636,6 +636,24 @@ test_case_do (TestCase *test,
|
||||
return FALSE;
|
||||
|
||||
if (!show_async)
|
||||
meta_test_client_wait_for_window_shown (client, window);
|
||||
}
|
||||
else if (strcmp (argv[0], "sync_shown") == 0)
|
||||
{
|
||||
MetaWindow *window;
|
||||
MetaTestClient *client;
|
||||
const char *window_id;
|
||||
|
||||
if (argc != 2)
|
||||
BAD_COMMAND("usage: %s <client-id>/<window-id>", argv[0]);
|
||||
|
||||
if (!test_case_parse_window_id (test, argv[1], &client, &window_id, error))
|
||||
return FALSE;
|
||||
|
||||
window = meta_test_client_find_window (client, window_id, error);
|
||||
if (!window)
|
||||
return FALSE;
|
||||
|
||||
meta_test_client_wait_for_window_shown (client, window);
|
||||
}
|
||||
else if (strcmp (argv[0], "resize") == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user