[gtk+/wip/wayland-tablet: 1255/1271] x11: Set GdkDeviceTool on motion/button events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/wayland-tablet: 1255/1271] x11: Set GdkDeviceTool on motion/button events
- Date: Wed, 21 Oct 2015 18:06:27 +0000 (UTC)
commit 14afd6834a614c78cbff2145f8fee9d3b9836ccd
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jan 6 14:57:21 2015 +0100
x11: Set GdkDeviceTool on motion/button events
The last known tool from the device is used here. If no tool is known,
the event will just have a NULL pointer there.
gdk/x11/gdkdevicemanager-xi2.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 5de3b0b..a792cd8 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -1453,6 +1453,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
source_device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->sourceid));
gdk_event_set_source_device (event, source_device);
+ gdk_event_set_device_tool (event, source_device->last_tool);
event->button.axes = translate_axes (event->button.device,
event->button.x,
@@ -1557,6 +1558,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
event->motion.device = device;
gdk_event_set_source_device (event, source_device);
+ gdk_event_set_device_tool (event, source_device->last_tool);
event->motion.state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]