backend/native: Hook up 'headless' mode to input and KMS subsystems
With this commit, it's possible to run mutter without being DRM master. It's not yet possible to add virtual monitors, but one can for example already add virtual input devices. This currently doesn't try to hook up to any logind session, thus will not have a real seat assigned. Currently it's hard coded to "seat0". Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>
This commit is contained in:
@ -106,12 +106,19 @@ meta_clutter_backend_native_init_events (ClutterBackend *clutter_backend)
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
MetaBackendNative *backend_native = META_BACKEND_NATIVE (backend);
|
||||
const char *seat_id;
|
||||
MetaSeatNativeFlag flags;
|
||||
|
||||
seat_id = meta_backend_native_get_seat_id (backend_native);
|
||||
|
||||
if (meta_backend_native_is_headless (backend_native))
|
||||
flags = META_SEAT_NATIVE_FLAG_NO_LIBINPUT;
|
||||
else
|
||||
flags = META_SEAT_NATIVE_FLAG_NONE;
|
||||
|
||||
clutter_backend_native->main_seat = g_object_new (META_TYPE_SEAT_NATIVE,
|
||||
"backend", clutter_backend,
|
||||
"seat-id", seat_id,
|
||||
"flags", flags,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user