[PATCH xf86-input-libinput] Post a motion event before a tablet button down
Peter Hutterer
peter.hutterer at who-t.net
Mon Jun 26 08:27:10 UTC 2017
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 at who-t.net>
---
src/xf86libinput.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/xf86libinput.c b/src/xf86libinput.c
index 2f6d62d..357715e 100644
--- a/src/xf86libinput.c
+++ b/src/xf86libinput.c
@@ -214,6 +214,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);
@@ -1723,12 +1727,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,
--
2.13.0
More information about the xorg-devel
mailing list