Commit 6ce3d024 authored by Peter Hutterer's avatar Peter Hutterer

Post a motion event before a tablet button down

Not all clients update the pointer position correctly from the button events
(for historical reasons) so we need to send a motion event before the button
event that represents a tip state change. Peter Hutterer's avatarPeter Hutterer <>
parent 87f9fe3a
......@@ -212,6 +212,10 @@ update_mode_prop(InputInfoPtr pInfo,
static enum event_handling
xf86libinput_handle_event(struct libinput_event *event);
static void
xf86libinput_post_tablet_motion(InputInfoPtr pInfo,
struct libinput_event_tablet_tool *event);
static inline int
use_server_fd(const InputInfoPtr pInfo) {
return pInfo->fd > -1 && (pInfo->flags & XI86_SERVER_FD);
......@@ -1716,12 +1720,15 @@ static enum event_handling
xf86libinput_handle_tablet_tip(InputInfoPtr pInfo,
struct libinput_event_tablet_tool *event)
DeviceIntPtr pDev = pInfo->dev;
enum libinput_tablet_tool_tip_state state;
const BOOL is_absolute = TRUE;
if (xf86libinput_tool_queue_event(event))
xf86libinput_post_tablet_motion(pDev->public.devicePrivate, event);
state = libinput_event_tablet_tool_get_tip_state(event);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment