Commit 8b206a26 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Keyboard.c: Make xkblock more robust

If xorg upstream xkb gets extended one day the previous code would not block new xkb calls even if they would change keyboard settings. So only act on the currently known calls and throw an error for all unknown calls.
parent 1e1ea1ce
......@@ -1600,11 +1600,31 @@ int ProcXkbInhibited(register ClientPtr client)
{
return BadAccess;
}
default:
case X_kbBell:
case X_kbGetCompatMap:
case X_kbGetControls:
case X_kbGetDeviceInfo:
case X_kbGetGeometry:
case X_kbGetIndicatorMap:
case X_kbGetIndicatorState:
case X_kbGetMap:
case X_kbGetNamedIndicator:
case X_kbGetNames:
case X_kbGetState:
case X_kbListComponents:
case X_kbPerClientFlags:
case X_kbSelectEvents:
case X_kbSetDeviceInfo:
case X_kbUseExtension:
{
return (client->swapped ? nxagentXkbWrapper.SProcXkbDispatchBackup(client) :
nxagentXkbWrapper.ProcXkbDispatchBackup(client));
}
default:
{
/* Just make sure that it works in case xkb gets extended in future */
return BadImplementation;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment