[mutter/gnome-3-24] clutter/x11: Set master device on pad button events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-24] clutter/x11: Set master device on pad button events
- Date: Thu, 13 Jul 2017 17:14:52 +0000 (UTC)
commit 45014a27a4faf8835319ad86b99bf2a9f43bbf79
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jul 12 22:27:33 2017 +0200
clutter/x11: Set master device on pad button events
These should be set one, but just set the master to be the slave
pad device. We are passively grabbing the pad device, so this is
consistent with active grabs on slave devices. Besides, pads are
paired to the VCP, which is not really truthful.
Fixes inoffensive warnings when trying to check whether motion
throttling applies for these events.
https://bugzilla.gnome.org/show_bug.cgi?id=784881
clutter/clutter/x11/clutter-device-manager-xi2.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter/x11/clutter-device-manager-xi2.c
b/clutter/clutter/x11/clutter-device-manager-xi2.c
index 8bddebf..5b40cb9 100644
--- a/clutter/clutter/x11/clutter-device-manager-xi2.c
+++ b/clutter/clutter/x11/clutter-device-manager-xi2.c
@@ -436,6 +436,9 @@ create_device (ClutterDeviceManagerXI2 *manager_xi2,
node_path = get_device_node_path (backend_x11, info);
}
+ if (source == CLUTTER_PAD_DEVICE)
+ is_enabled = TRUE;
+
retval = g_object_new (CLUTTER_TYPE_INPUT_DEVICE_XI2,
"name", info->name,
"id", info->deviceid,
@@ -1224,6 +1227,7 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
/* Pad buttons are 0-indexed */
event->pad_button.button = xev->detail - 1;
+ clutter_event_set_device (event, device);
clutter_event_set_source_device (event, source_device);
CLUTTER_NOTE (EVENT,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]