Revert "backend/native: Let get_seat_id() handle all modes"
This reverts commit a3082b8eb3
.
We don't find the VKMS device with this commit because it is on seat0
and not on META_BACKEND_TEST_INPUT_SEAT.
The other way around, i.e. returning seat0 in all cases also doesn't
work because *something* hangs if the default seat referrs to the real
seat0 instead of the nonesense META_BACKEND_TEST_INPUT_SEAT.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3869>
This commit is contained in:
parent
f767ccd7a8
commit
6bbb04bbf4
1 changed files with 15 additions and 4 deletions
|
@ -134,10 +134,22 @@ meta_backend_native_create_default_seat (MetaBackend *backend,
|
|||
GError **error)
|
||||
{
|
||||
MetaBackendNative *backend_native = META_BACKEND_NATIVE (backend);
|
||||
const char *seat_id;
|
||||
MetaBackendNativePrivate *priv =
|
||||
meta_backend_native_get_instance_private (backend_native);
|
||||
const char *seat_id = NULL;
|
||||
MetaSeatNativeFlag flags;
|
||||
|
||||
seat_id = meta_backend_native_get_seat_id (backend_native);
|
||||
switch (priv->mode)
|
||||
{
|
||||
case META_BACKEND_NATIVE_MODE_DEFAULT:
|
||||
case META_BACKEND_NATIVE_MODE_HEADLESS:
|
||||
case META_BACKEND_NATIVE_MODE_TEST_HEADLESS:
|
||||
seat_id = meta_backend_native_get_seat_id (backend_native);
|
||||
break;
|
||||
case META_BACKEND_NATIVE_MODE_TEST_VKMS:
|
||||
seat_id = META_BACKEND_TEST_INPUT_SEAT;
|
||||
break;
|
||||
}
|
||||
|
||||
if (meta_backend_is_headless (backend))
|
||||
flags = META_SEAT_NATIVE_FLAG_NO_LIBINPUT;
|
||||
|
@ -332,9 +344,8 @@ meta_backend_native_get_seat_id (MetaBackendNative *backend_native)
|
|||
switch (priv->mode)
|
||||
{
|
||||
case META_BACKEND_NATIVE_MODE_DEFAULT:
|
||||
return meta_launcher_get_seat_id (priv->launcher);
|
||||
case META_BACKEND_NATIVE_MODE_TEST_VKMS:
|
||||
return META_BACKEND_TEST_INPUT_SEAT;
|
||||
return meta_launcher_get_seat_id (priv->launcher);
|
||||
case META_BACKEND_NATIVE_MODE_HEADLESS:
|
||||
case META_BACKEND_NATIVE_MODE_TEST_HEADLESS:
|
||||
return "seat0";
|
||||
|
|
Loading…
Reference in a new issue