context: Load plugin during setup phase

The plugin must be configured by the context implementation during the
configure phase.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
This commit is contained in:
Jonas Ådahl
2021-03-02 11:48:22 +01:00
parent 75f9085ab9
commit fe652518af
3 changed files with 33 additions and 0 deletions

View File

@@ -49,6 +49,8 @@ meta_context_test_configure (MetaContext *context,
char ***argv,
GError **error)
{
const char *plugin_name;
g_test_init (argc, argv, NULL);
g_test_bug_base ("https://gitlab.gnome.org/GNOME/mutter/issues/");
@@ -57,6 +59,11 @@ meta_context_test_configure (MetaContext *context,
meta_wayland_override_display_name ("mutter-test-display");
meta_xwayland_override_display_number (512);
plugin_name = g_getenv ("MUTTER_TEST_PLUGIN_PATH");
if (!plugin_name)
plugin_name = "libdefault";
meta_context_set_plugin_name (context, plugin_name);
return TRUE;
}