[gtk+/wip/wayland-tablet: 538/555] 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: 538/555] x11: Set GdkDeviceTool on motion/button events
- Date: Tue, 29 Mar 2016 18:20:41 +0000 (UTC)
commit c1efbafa2972fd51a272e28c29d561578c6258fc
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 2dbc326..b70f5a7 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -1578,6 +1578,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
GUINT_TO_POINTER (xev->sourceid));
gdk_event_set_source_device (event, source_device);
gdk_event_set_seat (event, gdk_device_get_seat (device));
+ gdk_event_set_device_tool (event, source_device->last_tool);
event->button.axes = translate_axes (event->button.device,
event->button.x,
@@ -1686,6 +1687,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_seat (event, gdk_device_get_seat (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]