mirror of
https://github.com/brl/mutter.git
synced 2025-08-04 23:54:40 +00:00
tests: Ensure MetaX11Display is initialized before running tests
It might not be available right on initialization time if X11 is started asynchronously. As this is a requirement for our tests, ensure it is there before proceeding with the test. https://gitlab.gnome.org/GNOME/mutter/merge_requests/944
This commit is contained in:

committed by
Jonas Ådahl

parent
87a06c63ad
commit
21994bb00d
@@ -533,3 +533,17 @@ test_get_plugin_name (void)
|
||||
else
|
||||
return "libdefault";
|
||||
}
|
||||
|
||||
void
|
||||
test_wait_for_x11_display (void)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_get_display ();
|
||||
g_assert_nonnull (display);
|
||||
|
||||
while (!display->x11_display)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
|
||||
g_assert_nonnull (display->x11_display);
|
||||
}
|
||||
|
Reference in New Issue
Block a user