[mutter] backend/native/clutter: Get seat ID from backend
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backend/native/clutter: Get seat ID from backend
- Date: Thu, 28 Jan 2021 20:26:33 +0000 (UTC)
commit 6ecdf03efb83538acaffe7977b786b96eed50d8b
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Jan 19 11:06:40 2021 +0100
backend/native/clutter: Get seat ID from backend
We don't need to have MetaLauncher set it and guess it if that fails,
when we now have a getter from MetaBackendNative.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1689>
src/backends/native/meta-clutter-backend-native.c | 24 ++++++-----------------
src/backends/native/meta-clutter-backend-native.h | 2 --
src/backends/native/meta-launcher.c | 2 --
3 files changed, 6 insertions(+), 22 deletions(-)
---
diff --git a/src/backends/native/meta-clutter-backend-native.c
b/src/backends/native/meta-clutter-backend-native.c
index 998f50e619..798f670c18 100644
--- a/src/backends/native/meta-clutter-backend-native.c
+++ b/src/backends/native/meta-clutter-backend-native.c
@@ -44,6 +44,7 @@
#include "backends/meta-backend-private.h"
#include "backends/meta-renderer.h"
+#include "backends/native/meta-backend-native.h"
#include "backends/native/meta-seat-native.h"
#include "backends/native/meta-stage-native.h"
#include "clutter/clutter.h"
@@ -58,8 +59,6 @@ struct _MetaClutterBackendNative
MetaStageNative *stage_native;
};
-static gchar *evdev_seat_id;
-
G_DEFINE_TYPE (MetaClutterBackendNative, meta_clutter_backend_native,
CLUTTER_TYPE_BACKEND)
@@ -104,7 +103,11 @@ meta_clutter_backend_native_init_events (ClutterBackend *clutter_backend)
{
MetaClutterBackendNative *clutter_backend_native =
META_CLUTTER_BACKEND_NATIVE (clutter_backend);
- const gchar *seat_id = evdev_seat_id ? evdev_seat_id : "seat0";
+ MetaBackend *backend = meta_get_backend ();
+ MetaBackendNative *backend_native = META_BACKEND_NATIVE (backend);
+ const char *seat_id;
+
+ seat_id = meta_backend_native_get_seat_id (backend_native);
clutter_backend_native->main_seat = g_object_new (META_TYPE_SEAT_NATIVE,
"backend", clutter_backend,
@@ -158,18 +161,3 @@ meta_clutter_backend_native_class_init (MetaClutterBackendNativeClass *klass)
clutter_backend_class->get_default_seat = meta_clutter_backend_native_get_default_seat;
clutter_backend_class->is_display_server = meta_clutter_backend_native_is_display_server;
}
-
-/**
- * meta_cluter_backend_native_set_seat_id:
- * @seat_id: The seat ID
- *
- * Sets the seat to assign to the libinput context.
- *
- * For reliable effects, this function must be called before clutter_init().
- */
-void
-meta_clutter_backend_native_set_seat_id (const gchar *seat_id)
-{
- g_free (evdev_seat_id);
- evdev_seat_id = g_strdup (seat_id);
-}
diff --git a/src/backends/native/meta-clutter-backend-native.h
b/src/backends/native/meta-clutter-backend-native.h
index 60d20f3624..0dfc3e4aa0 100644
--- a/src/backends/native/meta-clutter-backend-native.h
+++ b/src/backends/native/meta-clutter-backend-native.h
@@ -37,6 +37,4 @@ G_DECLARE_FINAL_TYPE (MetaClutterBackendNative, meta_clutter_backend_native,
MetaStageNative * meta_clutter_backend_native_get_stage_native (ClutterBackend *backend);
-void meta_clutter_backend_native_set_seat_id (const gchar *seat_id);
-
#endif /* META_CLUTTER_BACKEND_NATIVE_H */
diff --git a/src/backends/native/meta-launcher.c b/src/backends/native/meta-launcher.c
index 4dafa8e88c..6e4537755e 100644
--- a/src/backends/native/meta-launcher.c
+++ b/src/backends/native/meta-launcher.c
@@ -528,8 +528,6 @@ meta_launcher_new (GError **error)
self->impl.sysfs_fds = g_hash_table_new (NULL, NULL);
self->session_active = TRUE;
- meta_clutter_backend_native_set_seat_id (self->seat_id);
-
meta_seat_impl_set_device_callbacks (on_evdev_device_open_in_input_impl,
on_evdev_device_close_in_input_impl,
self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]