forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
0287ec7e89
commit
9a81b65959
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user