summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-02-28 10:30:15 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-03-25 10:34:23 +1000
commit697071ab2b7f8910e01ed74618138538291cd1e8 (patch)
treeea68bb1952788125ccf7f250b2d00566be938216 /Xi
parent11bead1fa205a1353e6a33c6024c7e8ace80be7c (diff)
Xi: compress two if statements with the same body
We do the same thing here, compress them into one body. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 6fcca9ae3..05685a20b 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1904,7 +1904,9 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
}
/* 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;
@@ -1927,12 +1929,6 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
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;