mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-26 01:59:57 +00:00
dix: Emulate core events within CheckDeviceGrabs and ComputeFreezes.
This should restore the correct passive grab processing. When checking for passive grabs, the core event is emulated and we check first for XI grabs on the window, then for core grabs. Regardless of which event activates the grab, the XI event is stored in the device's EQ. When replaying the event, we take the XI event and replay it on the next window, again including the emulation of the core event.
This commit is contained in:
parent
a83a0c5a14
commit
0969a9f749
2 changed files with 51 additions and 51 deletions
|
|
@ -697,12 +697,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count)
|
|||
}
|
||||
return;
|
||||
}
|
||||
/* XI grabs have priority */
|
||||
core = *xE;
|
||||
core.u.u.type = coretype;
|
||||
if (!grab &&
|
||||
(CheckDeviceGrabs(device, xE, 0, count) ||
|
||||
(sendCore && CheckDeviceGrabs(device, &core, 0, 1)))) {
|
||||
if (!grab && CheckDeviceGrabs(device, xE, 0, count)) {
|
||||
device->deviceGrab.activatingKey = key;
|
||||
return;
|
||||
}
|
||||
|
|
@ -714,17 +709,11 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count)
|
|||
xE->u.u.detail = key;
|
||||
if (xE->u.u.detail == 0)
|
||||
return;
|
||||
if (!grab)
|
||||
if (!grab && CheckDeviceGrabs(device, xE, 0, count))
|
||||
{
|
||||
core = *xE;
|
||||
core.u.u.type = coretype;
|
||||
if (CheckDeviceGrabs(device, xE, 0, count) ||
|
||||
(sendCore && CheckDeviceGrabs(device, &core, 0, 1)))
|
||||
{
|
||||
/* if a passive grab was activated, the event has been sent
|
||||
* already */
|
||||
return;
|
||||
}
|
||||
/* if a passive grab was activated, the event has been sent
|
||||
* already */
|
||||
return;
|
||||
}
|
||||
|
||||
} else if (xE->u.u.type == DeviceButtonRelease) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue