diff options
author | Tudor Brindus <me@tbrindus.ca> | 2020-04-20 21:59:44 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-04-21 09:22:26 +0200 |
commit | f0d818f36e2a037a713462f791538fd4ffe4309e (patch) | |
tree | 9a06dd202a1afcea4cac3ec538e951e306675e7d /backend/libinput | |
parent | 85e299e6c55e5478617cb167eea316cfe7ee430c (diff) |
backend/libinput: correctly populate x/y fields on tablet proximity in
Otherwise, the cursor will briefly jump to (0, 0). This is particularly
noticeable in the referenced issue (the game osu!).
Refs swaywm/sway#3633
Diffstat (limited to 'backend/libinput')
-rw-r--r-- | backend/libinput/tablet_tool.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c index ff48f6a3..6ac10a87 100644 --- a/backend/libinput/tablet_tool.c +++ b/backend/libinput/tablet_tool.c @@ -269,6 +269,9 @@ void handle_tablet_tool_proximity(struct libinput_event *event, wlr_event.device = wlr_dev; wlr_event.time_msec = usec_to_msec(libinput_event_tablet_tool_get_time_usec(tevent)); + wlr_event.x = libinput_event_tablet_tool_get_x_transformed(tevent, 1); + wlr_event.y = libinput_event_tablet_tool_get_y_transformed(tevent, 1); + switch (libinput_event_tablet_tool_get_proximity_state(tevent)) { case LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT: wlr_event.state = WLR_TABLET_TOOL_PROXIMITY_OUT; |