mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
xkb: don't overwrite CtrlProc in the second run of XkbFinishDeviceInit.
XkbFinishDeviceInit is called once when the device is initialised, but also when a class copy causes the key class of a device to change. In this case, overwriting the CtrlProc of the KeybdFeedbackClass with XkbDDXKeybdCtrlProc sets up a nice recursive loop of XkbDDXKeybdCtrlProc calling itself until the cows come home.
This commit is contained in:
@@ -726,7 +726,10 @@ XkbSrvLedInfoPtr sli;
|
||||
if (pXDev && pXDev->key && pXDev->key->xkbInfo && pXDev->kbdfeed) {
|
||||
xkbi= pXDev->key->xkbInfo;
|
||||
xkb= xkbi->desc;
|
||||
if (pXDev->kbdfeed) {
|
||||
/* If we come from DeepCopyDeviceClasses, the CtrlProc was already set
|
||||
* to XkbDDXKeybdCtrlProc, overwriting it leads to happy recursion.
|
||||
*/
|
||||
if (pXDev->kbdfeed && pXDev->kbdfeed->CtrlProc != XkbDDXKeybdCtrlProc) {
|
||||
xkbi->kbdProc= pXDev->kbdfeed->CtrlProc;
|
||||
pXDev->kbdfeed->CtrlProc= XkbDDXKeybdCtrlProc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user