[mutter] udev: Fetch seat-id via backend instead of laucher
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] udev: Fetch seat-id via backend instead of laucher
- Date: Thu, 28 Jan 2021 20:26:33 +0000 (UTC)
commit 8de3190627fa0fbbc59d4560fdadbbdc2f042f8a
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Mon Jan 18 22:38:21 2021 +0100
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>
src/backends/native/meta-backend-native.c | 6 ++++++
src/backends/native/meta-backend-native.h | 2 ++
src/backends/native/meta-udev.c | 4 +---
3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
index cd9275ca08..bf270c3ffa 100644
--- a/src/backends/native/meta-backend-native.c
+++ b/src/backends/native/meta-backend-native.c
@@ -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)
diff --git a/src/backends/native/meta-backend-native.h b/src/backends/native/meta-backend-native.h
index b389652b2d..b0d82d0161 100644
--- a/src/backends/native/meta-backend-native.h
+++ b/src/backends/native/meta-backend-native.h
@@ -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 */
diff --git a/src/backends/native/meta-udev.c b/src/backends/native/meta-udev.c
index 9568698595..649c9df27e 100644
--- a/src/backends/native/meta-udev.c
+++ b/src/backends/native/meta-udev.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]