tests/wayland-test-utils: Add helper to wait for window
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2810>
This commit is contained in:
parent
9856dac593
commit
337ade622c
@ -135,3 +135,19 @@ meta_find_client_window (MetaContext *context,
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MetaWindow *
|
||||||
|
meta_wait_for_client_window (MetaContext *context,
|
||||||
|
const char *title)
|
||||||
|
{
|
||||||
|
while (TRUE)
|
||||||
|
{
|
||||||
|
MetaWindow *window;
|
||||||
|
|
||||||
|
window = meta_find_client_window (context, title);
|
||||||
|
if (window)
|
||||||
|
return window;
|
||||||
|
|
||||||
|
g_main_context_iteration (NULL, TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -30,4 +30,7 @@ void meta_wayland_test_client_finish (MetaWaylandTestClient *wayland_test_client
|
|||||||
MetaWindow * meta_find_client_window (MetaContext *context,
|
MetaWindow * meta_find_client_window (MetaContext *context,
|
||||||
const char *title);
|
const char *title);
|
||||||
|
|
||||||
|
MetaWindow * meta_wait_for_client_window (MetaContext *context,
|
||||||
|
const char *title);
|
||||||
|
|
||||||
#endif /* META_WAYLAND_TEST_UTILS_H */
|
#endif /* META_WAYLAND_TEST_UTILS_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user