mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-21 20:26:45 +00:00
Input: Store passive-activating key in CheckDeviceGrabs
CheckDeviceGrabs will activate a passive grab for KeyPress and ButtonPress events. GrabInfoRec::activatingKey contains the keycode which activated the passive grab, so we can deactivate it later in ProcessOtherEvents. Previously, CheckDeviceGrabs relied on its callers to set activatingKey, which not all callers were doing (I'm looking at you, ComputeFreezes). Just set it in CheckDeviceGrabs instead. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
0f9c6f2f82
commit
da39d57a20
2 changed files with 16 additions and 8 deletions
|
|
@ -1047,10 +1047,8 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
|
|||
switch(event->type)
|
||||
{
|
||||
case ET_KeyPress:
|
||||
if (!grab && CheckDeviceGrabs(device, event, 0)) {
|
||||
device->deviceGrab.activatingKey = key;
|
||||
if (!grab && CheckDeviceGrabs(device, event, 0))
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case ET_KeyRelease:
|
||||
if (grab && device->deviceGrab.fromPassiveGrab &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue