diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-08-05 15:47:46 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-08-06 10:05:12 +1000 |
commit | 3abbd327f4a732408119de1f8e9ecba4812772a5 (patch) | |
tree | e97e8ecf14a96be4913d9ae35ccdc35e88ffcb0f /dix | |
parent | c29aa7da220661532b05972cacd3dbaff29408b5 (diff) |
dix: detach SD during XI2 grabs only.
XI1 grabs on slave devices leave the device attached - just like in earlier
versions of XI.
Tested-by: Thomas Jaeger
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/events.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/dix/events.c b/dix/events.c index 916a6da1c..ec6aff7d6 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1515,7 +1515,8 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, Bool isPassive = autoGrab & ~ImplicitGrabMask; /* slave devices need to float for the duration of the grab. */ - if (!(autoGrab & ImplicitGrabMask) && !IsMaster(mouse)) + if (grab->grabtype == GRABTYPE_XI2 && + !(autoGrab & ImplicitGrabMask) && !IsMaster(mouse)) DetachFromMaster(mouse); if (grab->confineTo) @@ -1573,7 +1574,7 @@ DeactivatePointerGrab(DeviceIntPtr mouse) if (grab->cursor) FreeCursor(grab->cursor, (Cursor)0); - if (!wasImplicit) + if (!wasImplicit && grab->grabtype == GRABTYPE_XI2) ReattachToOldMaster(mouse); ComputeFreezes(); @@ -1591,7 +1592,9 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass WindowPtr oldWin; /* slave devices need to float for the duration of the grab. */ - if (!(passive & ImplicitGrabMask) && !IsMaster(keybd)) + if (grab->grabtype == GRABTYPE_XI2 && + !(passive & ImplicitGrabMask) && + !IsMaster(keybd)) DetachFromMaster(keybd); if (grabinfo->grab) @@ -1644,7 +1647,7 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) } DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab); - if (!wasImplicit) + if (!wasImplicit && grab->grabtype == GRABTYPE_XI2) ReattachToOldMaster(keybd); ComputeFreezes(); |