}
/* Event in response to reject */
- if (ev->device_event.flags & TOUCH_REJECT) {
+ if (ev->device_event.flags & TOUCH_REJECT ||
+ (ev->device_event.flags & TOUCH_ACCEPT && !TouchResourceIsOwner(ti, listener->listener))) {
+ /* Touch has been rejected, or accepted by its owner which is not this listener */
if (listener->state != LISTENER_HAS_END)
rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
listener->state = LISTENER_HAS_END;
if (normal_end)
listener->state = LISTENER_HAS_END;
}
- else if (ev->device_event.flags & TOUCH_ACCEPT) {
- /* Touch has been accepted by its owner, which is not this listener */
- if (listener->state != LISTENER_HAS_END)
- rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
- listener->state = LISTENER_HAS_END;
- }
out:
return rc;