From 8b206a261c97817adf951a272035c2202f440765 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 22 Jul 2017 15:26:11 +0200 Subject: 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. --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 565153f84..22cf1b44d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -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; + } } } -- cgit v1.2.3