[gtk+/wip/tablet-tools: 5/5] x11: Set GdkDeviceTool on motion/button events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/tablet-tools: 5/5] x11: Set GdkDeviceTool on motion/button events
- Date: Tue, 6 Jan 2015 14:09:40 +0000 (UTC)
commit 16241603300d355ece2d1b2e19284ed1abeb98d8
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 6b54727..a0288d7 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -1377,6 +1377,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,
@@ -1481,6 +1482,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]