summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-12-08 12:00:34 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-12-13 13:24:08 +1000
commit47734b2ba2e1f9246fd1a3b7059ca60b0e15acb2 (patch)
treeeb6794e02f665c63c893a8ca59aab99d0e77894b /dix
parent1d01e861b69d7ca8fe2335270b8286bc115fb6e9 (diff)
dix: move delivery stop condition out of event mask
Previously, this was only called if there was a mask match, so even if we had a no-propagate flag set or a stopAt window specified, if no mask triggered on the window we would recurse up to the root window and eventually deliver. Move this, so that the stopAt and do-not-propagate mask is honoured. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'dix')
-rw-r--r--dix/events.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/dix/events.c b/dix/events.c
index 9fcd447a3..9703ca9cd 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2693,12 +2693,13 @@ DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab,
break;
}
- if ((deliveries < 0) || (pWin == stopAt) ||
- (mask & EVENT_DONT_PROPAGATE_MASK))
- {
- deliveries = 0;
- break;
- }
+ }
+
+ if ((deliveries < 0) || (pWin == stopAt) ||
+ (mask & EVENT_DONT_PROPAGATE_MASK))
+ {
+ deliveries = 0;
+ break;
}
child = pWin->drawable.id;