Revert "backend/native: Let get_seat_id() handle all modes"
This reverts commit a3082b8eb35fffbb4c23f7794414a58c14708177. 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
@ -134,10 +134,22 @@ meta_backend_native_create_default_seat (MetaBackend *backend,
|
|||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
MetaBackendNative *backend_native = META_BACKEND_NATIVE (backend);
|
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;
|
MetaSeatNativeFlag flags;
|
||||||
|
|
||||||
|
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);
|
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))
|
if (meta_backend_is_headless (backend))
|
||||||
flags = META_SEAT_NATIVE_FLAG_NO_LIBINPUT;
|
flags = META_SEAT_NATIVE_FLAG_NO_LIBINPUT;
|
||||||
@ -332,9 +344,8 @@ meta_backend_native_get_seat_id (MetaBackendNative *backend_native)
|
|||||||
switch (priv->mode)
|
switch (priv->mode)
|
||||||
{
|
{
|
||||||
case META_BACKEND_NATIVE_MODE_DEFAULT:
|
case META_BACKEND_NATIVE_MODE_DEFAULT:
|
||||||
return meta_launcher_get_seat_id (priv->launcher);
|
|
||||||
case META_BACKEND_NATIVE_MODE_TEST_VKMS:
|
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_HEADLESS:
|
||||||
case META_BACKEND_NATIVE_MODE_TEST_HEADLESS:
|
case META_BACKEND_NATIVE_MODE_TEST_HEADLESS:
|
||||||
return "seat0";
|
return "seat0";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user