mirror of
https://github.com/X11Libre/xf86-input-libinput.git
synced 2026-04-14 10:54:17 +00:00
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>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user