summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-11-30 11:32:59 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-11-30 11:32:59 +1030
commit9eb8ea9e615ebd8b568711eeca36aa84aa781ad3 (patch)
tree5fa3ba1c824994ec8b5ccb52dfde89b87f066feb
parente4fe0a3cb789b8757f1c80f606dfe32bccada582 (diff)
dix: only freeze the paired MD on a grab, not all other devices.
-rw-r--r--dix/events.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/dix/events.c b/dix/events.c
index 43f4e3796..418079de6 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1520,23 +1520,24 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
CLIENT_BITS(grab->resource)))
thisDev->deviceGrab.sync.other = NullGrab;
}
- /* XXX: other should only work on the paired keyboard, not on all other
- devices
+
+ /*
+ XXX: Direct slave grab won't freeze the paired master device.
+ The correct thing to do would be to freeze all SDs attached to the
+ paired master device.
*/
- for (dev = inputInfo.devices; dev; dev = dev->next)
+ if (thisDev->isMaster)
{
- if (dev != thisDev)
- {
- if (otherMode == GrabModeSync)
- dev->deviceGrab.sync.other = grab;
- else
- { /* free both if same client owns both */
- if (dev->deviceGrab.sync.other &&
- (CLIENT_BITS(dev->deviceGrab.sync.other->resource) ==
- CLIENT_BITS(grab->resource)))
- dev->deviceGrab.sync.other = NullGrab;
- }
- }
+ dev = GetPairedDevice(thisDev);
+ if (otherMode == GrabModeSync)
+ dev->deviceGrab.sync.other = grab;
+ else
+ { /* free both if same client owns both */
+ if (dev->deviceGrab.sync.other &&
+ (CLIENT_BITS(dev->deviceGrab.sync.other->resource) ==
+ CLIENT_BITS(grab->resource)))
+ dev->deviceGrab.sync.other = NullGrab;
+ }
}
ComputeFreezes();
}