summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multitouch.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/multitouch.c b/multitouch.c
index 4a3d8e0..b199d2d 100644
--- a/multitouch.c
+++ b/multitouch.c
@@ -236,6 +236,8 @@ static void print_event(struct multitouch *mt, XIDeviceEvent* event)
msg("\t%.2f/%.2f (%.2f/%.2f)\n", event->event_x, event->event_y, event->root_x, event->root_y);
msg("\ttouchid: %d\n", event->detail);
msg("\ton %s\n", event->event == mt->win ? "window" : "blackbar");
+ if (event->flags & XITouchPendingEnd)
+ msg("\tflags: pending end\n");
}
static void paint_touch_begin(struct multitouch *mt, XIDeviceEvent *event)
@@ -392,8 +394,13 @@ static void handle_grabbed_event(struct multitouch *mt, XIDeviceEvent *event)
switch (event->evtype)
{
- case XI_TouchEnd: grab->state = TSTATE_END; break;
- case XI_TouchUpdate: grab->state = TSTATE_UPDATE; break;
+ case XI_TouchEnd:
+ grab->state = TSTATE_END;
+ XIAllowTouchEvents(mt->dpy, event->deviceid, event->detail, event->event, XIAcceptTouch);
+ break;
+ case XI_TouchUpdate:
+ grab->state = TSTATE_UPDATE;
+ break;
}
}