backend-native: Add non-functional 'headless' mode

Make it possible to pass --headless as a command line argument in order
to turn the native backend "headless". This currently doesn't do
anything, but the intention is that it should not use logind nor KMS,
and work completely headless with only virtual outputs.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>
This commit is contained in:
Jonas Ådahl
2020-03-05 21:35:57 +01:00
committed by Marge Bot
parent b770ea606a
commit 42d614f6fa
4 changed files with 110 additions and 11 deletions

View File

@ -1458,14 +1458,20 @@ meta_backend_get_clutter_backend (MetaBackend *backend)
}
void
meta_init_backend (GType backend_gtype)
meta_init_backend (GType backend_gtype,
unsigned int n_properties,
const char *names[],
const GValue *values)
{
MetaBackend *backend;
GError *error = NULL;
/* meta_backend_init() above install the backend globally so
* so meta_get_backend() works even during initialization. */
backend = g_object_new (backend_gtype, NULL);
backend = META_BACKEND (g_object_new_with_properties (backend_gtype,
n_properties,
names,
values));
if (!g_initable_init (G_INITABLE (backend), NULL, &error))
{
g_warning ("Failed to create backend: %s", error->message);