mirror of
https://github.com/brl/mutter.git
synced 2025-01-11 12:12:25 +00:00
udev: Fetch seat-id via backend instead of laucher
Configurations where we won't have a MetaLauncher will be added, so avoid using its API directly. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1689>
This commit is contained in:
parent
41246cb31d
commit
8de3190627
@ -314,6 +314,12 @@ meta_backend_native_lock_layout_group (MetaBackend *backend,
|
||||
meta_backend_notify_keymap_layout_group_changed (backend, idx);
|
||||
}
|
||||
|
||||
const char *
|
||||
meta_backend_native_get_seat_id (MetaBackendNative *backend_native)
|
||||
{
|
||||
return meta_launcher_get_seat_id (backend_native->launcher);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_backend_native_set_pointer_constraint (MetaBackend *backend,
|
||||
MetaPointerConstraint *constraint)
|
||||
|
@ -47,4 +47,6 @@ MetaUdev * meta_backend_native_get_udev (MetaBackendNative *native);
|
||||
|
||||
MetaKms * meta_backend_native_get_kms (MetaBackendNative *native);
|
||||
|
||||
const char * meta_backend_native_get_seat_id (MetaBackendNative *backend_native);
|
||||
|
||||
#endif /* META_BACKEND_NATIVE_H */
|
||||
|
@ -111,8 +111,6 @@ gboolean
|
||||
meta_udev_is_drm_device (MetaUdev *udev,
|
||||
GUdevDevice *device)
|
||||
{
|
||||
MetaLauncher *launcher =
|
||||
meta_backend_native_get_launcher (udev->backend_native);
|
||||
const char *seat_id;
|
||||
const char *device_type;
|
||||
const char *device_seat;
|
||||
@ -133,7 +131,7 @@ meta_udev_is_drm_device (MetaUdev *udev,
|
||||
}
|
||||
|
||||
/* Skip devices that do not belong to our seat. */
|
||||
seat_id = meta_launcher_get_seat_id (launcher);
|
||||
seat_id = meta_backend_native_get_seat_id (udev->backend_native);
|
||||
if (g_strcmp0 (seat_id, device_seat))
|
||||
return FALSE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user