diff options
Diffstat (limited to 'dix/devices.c')
-rw-r--r-- | dix/devices.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/dix/devices.c b/dix/devices.c index aa0486219..e6a504954 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -69,9 +69,7 @@ SOFTWARE. #ifdef XKB #include <X11/extensions/XKBsrv.h> #endif -#ifdef XACE #include "xace.h" -#endif #include "dispatch.h" #include "swaprep.h" @@ -1178,10 +1176,8 @@ DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, } } -#ifdef XACE if (!XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE)) return BadAccess; -#endif /* None of the modifiers (old or new) may be down while we change * the map. */ @@ -1302,14 +1298,12 @@ ProcChangeKeyboardMapping(ClientPtr client) return BadValue; } -#ifdef XACE for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { if (!XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE)) return BadAccess; } } -#endif keysyms.minKeyCode = stuff->firstKeyCode; keysyms.maxKeyCode = stuff->firstKeyCode + stuff->keyCodes - 1; @@ -1655,7 +1649,6 @@ ProcChangeKeyboardControl (ClientPtr client) if (client->req_len != (sizeof(xChangeKeyboardControlReq)>>2)+Ones(vmask)) return BadLength; -#ifdef XACE for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { @@ -1663,7 +1656,6 @@ ProcChangeKeyboardControl (ClientPtr client) return BadAccess; } } -#endif for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && @@ -1920,15 +1912,13 @@ ProcQueryKeymap(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 2; -#ifdef XACE - if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) - { - bzero((char *)&rep.map[0], 32); - } + + if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) + for (i = 0; i<32; i++) + rep.map[i] = down[i]; else -#endif - for (i = 0; i<32; i++) - rep.map[i] = down[i]; + bzero((char *)&rep.map[0], 32); + WriteReplyToClient(client, sizeof(xQueryKeymapReply), &rep); return Success; } |