mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00: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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user