summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-06-26 18:27:10 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-08-17 15:20:29 +1000
commit6ce3d0249d426e6b3c83e7f86d76bb3145c00a74 (patch)
tree75f67fd581b757e3bd449ef96ab0abf324d6e546 /src
parent87f9fe3a6fafe60134c69419c0e551b9dbc112b7 (diff)
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. https://bugs.freedesktop.org/show_bug.cgi?id=101588 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/xf86libinput.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xf86libinput.c b/src/xf86libinput.c
index fa31b78..5727040 100644
--- a/src/xf86libinput.c
+++ b/src/xf86libinput.c
@@ -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))
return EVENT_QUEUED;
+ xf86libinput_post_tablet_motion(pDev->public.devicePrivate, event);
+
state = libinput_event_tablet_tool_get_tip_state(event);
xf86PostButtonEventP(pInfo->dev,