tests/clutter: Disable X11 client support

This avoids test failure happening due to Xwayland getting the CPU time
instead of the tests themself, causing failures e.g. due to
missing frames.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1555
This commit is contained in:
Jonas Ådahl 2020-11-08 22:02:39 +01:00 committed by Georges Basile Stavracas Neto
parent 1499bda592
commit f57c39f511
3 changed files with 16 additions and 0 deletions

View File

@ -51,6 +51,9 @@ void meta_override_compositor_configuration (MetaCompositorType compositor_type,
MetaDisplayPolicy meta_get_x11_display_policy (void);
META_EXPORT_TEST
void meta_override_x11_display_policy (MetaDisplayPolicy x11_display_policy);
META_EXPORT_TEST
void meta_start (void);

View File

@ -772,6 +772,14 @@ prefs_changed_callback (MetaPreference pref,
}
}
static MetaDisplayPolicy x11_display_policy_override = -1;
void
meta_override_x11_display_policy (MetaDisplayPolicy x11_display_policy)
{
x11_display_policy_override = x11_display_policy;
}
MetaDisplayPolicy
meta_get_x11_display_policy (void)
{
@ -780,6 +788,9 @@ meta_get_x11_display_policy (void)
if (META_IS_BACKEND_X11_CM (backend))
return META_DISPLAY_POLICY_MANDATORY;
if (x11_display_policy_override != -1)
return x11_display_policy_override;
#ifdef HAVE_WAYLAND
if (meta_is_wayland_compositor ())
{

View File

@ -5,6 +5,7 @@
#include <clutter/clutter.h>
#include "compositor/meta-plugin-manager.h"
#include "core/main-private.h"
typedef struct {
gpointer dummy_field;
@ -50,6 +51,7 @@ init_common_pre (void)
"aborting...\n");
meta_plugin_manager_load (test_get_plugin_name ());
meta_override_x11_display_policy (META_DISPLAY_POLICY_DISABLED);
meta_test_init ();
display = g_getenv ("DISPLAY");