summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-09-04 15:34:26 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-10-14 11:07:37 +1000
commitbe6ea80b79b3d6eb97106ea142e01acbdf059995 (patch)
tree363fbbe400b59e64564cfdd2cc1a50131c7453b2 /dix
parent93a27b2dd0d7ed51120f42456a91a7c59902ebc2 (diff)
dix: only allow button and key events to freeze a sync'd pointer
If a client calls XAllowEvents(SyncPointer) it expects events as normal until the next button press or release event - that freezes the device. An e.g. proximity event must thus not freeze the pointer. As per the spec, only button and key events may do so, so narrow it to these cases. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r--dix/events.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dix/events.c b/dix/events.c
index 086601a69..d63db95e4 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -4268,7 +4268,11 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
if (deliveries && (event->any.type == ET_Motion))
thisDev->valuator->motionHintWindow = grab->window;
}
- if (deliveries && !deactivateGrab && event->any.type != ET_Motion) {
+ if (deliveries && !deactivateGrab &&
+ (event->any.type == ET_KeyPress ||
+ event->any.type == ET_KeyRelease ||
+ event->any.type == ET_ButtonPress ||
+ event->any.type == ET_ButtonRelease)) {
switch (grabinfo->sync.state) {
case FREEZE_BOTH_NEXT_EVENT:
dev = GetPairedDevice(thisDev);