aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2021-07-10 14:02:20 +0200
committerFurkan Sahin <furkan-dev@proton.me>2021-07-10 14:02:20 +0200
commit5c47900386800e558b3d43d152b738e1966ad2ee (patch)
treec7f7432dd647bc0c6f06389dd3d42d6e2a28ed7b /include
parent4ec7737b1638e63c8d233bfc3274ed58cfe215a5 (diff)
Fix wl_pointer.frame not sent on touch emulation
When emulating touch, the simulating_pointer_from_touch field is set to true. It's switched back to false when a touch_up event is received. However we need to ensure we always send a wl_pointer.frame event following a group of other wl_pointer events. Since a touch_frame event is always guaranteed to come after a group of touch events, unset simulating_pointer_from_touch in the touch_frame handler instead of the touch_up handler. Add a new field to know whether the touch_frame handler should stop emulation.
Diffstat (limited to 'include')
-rw-r--r--include/sway/input/cursor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
index b053b85f..7d66e699 100644
--- a/include/sway/input/cursor.h
+++ b/include/sway/input/cursor.h
@@ -54,6 +54,7 @@ struct sway_cursor {
struct wl_listener touch_motion;
struct wl_listener touch_frame;
bool simulating_pointer_from_touch;
+ bool pointer_touch_up;
int32_t pointer_touch_id;
struct wl_listener tool_axis;