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>
This commit is contained in:
parent
c29aa7da22
commit
3abbd327f4
11
dix/events.c
11
dix/events.c
|
@ -1515,7 +1515,8 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab,
|
||||||
Bool isPassive = autoGrab & ~ImplicitGrabMask;
|
Bool isPassive = autoGrab & ~ImplicitGrabMask;
|
||||||
|
|
||||||
/* slave devices need to float for the duration of the grab. */
|
/* 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);
|
DetachFromMaster(mouse);
|
||||||
|
|
||||||
if (grab->confineTo)
|
if (grab->confineTo)
|
||||||
|
@ -1573,7 +1574,7 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
|
||||||
if (grab->cursor)
|
if (grab->cursor)
|
||||||
FreeCursor(grab->cursor, (Cursor)0);
|
FreeCursor(grab->cursor, (Cursor)0);
|
||||||
|
|
||||||
if (!wasImplicit)
|
if (!wasImplicit && grab->grabtype == GRABTYPE_XI2)
|
||||||
ReattachToOldMaster(mouse);
|
ReattachToOldMaster(mouse);
|
||||||
|
|
||||||
ComputeFreezes();
|
ComputeFreezes();
|
||||||
|
@ -1591,7 +1592,9 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass
|
||||||
WindowPtr oldWin;
|
WindowPtr oldWin;
|
||||||
|
|
||||||
/* slave devices need to float for the duration of the grab. */
|
/* 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);
|
DetachFromMaster(keybd);
|
||||||
|
|
||||||
if (grabinfo->grab)
|
if (grabinfo->grab)
|
||||||
|
@ -1644,7 +1647,7 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd)
|
||||||
}
|
}
|
||||||
DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab);
|
DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab);
|
||||||
|
|
||||||
if (!wasImplicit)
|
if (!wasImplicit && grab->grabtype == GRABTYPE_XI2)
|
||||||
ReattachToOldMaster(keybd);
|
ReattachToOldMaster(keybd);
|
||||||
|
|
||||||
ComputeFreezes();
|
ComputeFreezes();
|
||||||
|
|
Loading…
Reference in New Issue