aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>2019-08-08 03:49:59 +0200
committerDrew DeVault <sir@cmpwn.com>2019-08-12 09:31:49 +0900
commit40d17c1305676d2b720903458e190b93d6dccbe6 (patch)
tree66e698130deb13ad18db9051e9b531fee7f516d7
parent94f65e354d09ded037e6ba724dc3eeed6d63778f (diff)
wlr_seat_touch: add a way for a grab to ignore a touch point
-rw-r--r--types/seat/wlr_seat_touch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/types/seat/wlr_seat_touch.c b/types/seat/wlr_seat_touch.c
index 58db92cf..dd57b55a 100644
--- a/types/seat/wlr_seat_touch.c
+++ b/types/seat/wlr_seat_touch.c
@@ -175,6 +175,11 @@ uint32_t wlr_seat_touch_notify_down(struct wlr_seat *seat,
uint32_t serial = grab->interface->down(grab, time, point);
+ if (!serial) {
+ touch_point_destroy(point);
+ return 0;
+ }
+
if (serial && wlr_seat_touch_num_points(seat) == 1) {
seat->touch_state.grab_serial = serial;
seat->touch_state.grab_id = touch_id;