[mutter] wayland: Use clutter_input_device_is_grouped() for tablet grouping
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Use clutter_input_device_is_grouped() for tablet grouping
- Date: Mon, 13 Mar 2017 20:16:33 +0000 (UTC)
commit 29b240e8838cf923ff0f5c8a7b380b035c23f4bb
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Feb 13 11:59:44 2017 +0100
wayland: Use clutter_input_device_is_grouped() for tablet grouping
Instead of poking the internal libinput device.
https://bugzilla.gnome.org/show_bug.cgi?id=779986
src/wayland/meta-wayland-tablet-seat.c | 19 ++-----------------
1 files changed, 2 insertions(+), 17 deletions(-)
---
diff --git a/src/wayland/meta-wayland-tablet-seat.c b/src/wayland/meta-wayland-tablet-seat.c
index 5e34ad3..e6390e3 100644
--- a/src/wayland/meta-wayland-tablet-seat.c
+++ b/src/wayland/meta-wayland-tablet-seat.c
@@ -482,14 +482,7 @@ lookup_grouped_devices (ClutterInputDevice *device,
ClutterDeviceManager *device_manager;
const GSList *devices, *l;
GList *group = NULL;
- MetaBackend *backend = meta_get_backend ();
-#ifdef HAVE_NATIVE_BACKEND
- struct libinput_device *dev = NULL, *libinput_device;
-
- if (META_IS_BACKEND_NATIVE (backend))
- dev = clutter_evdev_input_device_get_libinput_device (device);
-#endif
device_manager = clutter_device_manager_get_default ();
devices = clutter_device_manager_peek_devices (device_manager);
@@ -500,16 +493,8 @@ lookup_grouped_devices (ClutterInputDevice *device,
if (clutter_input_device_get_device_type (l->data) != type)
continue;
-#ifdef HAVE_NATIVE_BACKEND
- if (META_IS_BACKEND_NATIVE (backend))
- {
- libinput_device = clutter_evdev_input_device_get_libinput_device (l->data);
-
- if (libinput_device_get_device_group (dev) !=
- libinput_device_get_device_group (libinput_device))
- continue;
- }
-#endif
+ if (!clutter_input_device_is_grouped (device, l->data))
+ continue;
group = g_list_prepend (group, l->data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]