mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-04 21:08:13 +02:00
Xi: fix an inputInfo.keyboard usage.
In the case of a RevertToFollowKeyboard, the master device should be used (since this is the closest equivalent to the VCK as before). Only if the master keyboard is the same as the device, revert to the VCK itself.
This commit is contained in:
parent
b3463fd6a8
commit
023f959e68
1 changed files with 8 additions and 4 deletions
|
|
@ -1846,16 +1846,20 @@ DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev)
|
|||
dev->focus->traceGood = 0;
|
||||
break;
|
||||
case RevertToFollowKeyboard:
|
||||
if (inputInfo.keyboard->focus->win) {
|
||||
DoFocusEvents(dev, pWin, inputInfo.keyboard->focus->win,
|
||||
focusEventMode);
|
||||
{
|
||||
DeviceIntPtr kbd = GetMaster(dev, MASTER_KEYBOARD);
|
||||
if (!kbd || (kbd == dev && kbd != inputInfo.keyboard))
|
||||
kbd = inputInfo.keyboard;
|
||||
if (kbd->focus->win) {
|
||||
DoFocusEvents(dev, pWin, kbd->focus->win, focusEventMode);
|
||||
dev->focus->win = FollowKeyboardWin;
|
||||
dev->focus->traceGood = 0;
|
||||
} else {
|
||||
DoFocusEvents(dev, pWin, NoneWin, focusEventMode);
|
||||
DoFocusEvents(dev, pWin, NoneWin, focusEventMode);
|
||||
dev->focus->win = NoneWin;
|
||||
dev->focus->traceGood = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue