aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seatop_down.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/seatop_down.c')
-rw-r--r--sway/input/seatop_down.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sway/input/seatop_down.c b/sway/input/seatop_down.c
index 6447134e..c5901f6a 100644
--- a/sway/input/seatop_down.c
+++ b/sway/input/seatop_down.c
@@ -104,6 +104,24 @@ static void handle_touch_down(struct sway_seat *seat,
104 } 104 }
105} 105}
106 106
107static void handle_touch_cancel(struct sway_seat *seat,
108 struct wlr_touch_cancel_event *event) {
109 struct seatop_down_event *e = seat->seatop_data;
110 struct seatop_touch_point_event *point_event, *tmp;
111
112 wl_list_for_each_safe(point_event, tmp, &e->point_events, link) {
113 if (point_event->touch_id == event->touch_id) {
114 wl_list_remove(&point_event->link);
115 free(point_event);
116 break;
117 }
118 }
119
120 if (e->surface) {
121 wlr_seat_touch_notify_cancel(seat->wlr_seat, e->surface);
122 }
123}
124
107static void handle_pointer_axis(struct sway_seat *seat, 125static void handle_pointer_axis(struct sway_seat *seat,
108 struct wlr_pointer_axis_event *event) { 126 struct wlr_pointer_axis_event *event) {
109 struct sway_input_device *input_device = 127 struct sway_input_device *input_device =
@@ -189,6 +207,7 @@ static const struct sway_seatop_impl seatop_impl = {
189 .touch_motion = handle_touch_motion, 207 .touch_motion = handle_touch_motion,
190 .touch_up = handle_touch_up, 208 .touch_up = handle_touch_up,
191 .touch_down = handle_touch_down, 209 .touch_down = handle_touch_down,
210 .touch_cancel = handle_touch_cancel,
192 .unref = handle_unref, 211 .unref = handle_unref,
193 .end = handle_end, 212 .end = handle_end,
194 .allow_set_cursor = true, 213 .allow_set_cursor = true,