summaryrefslogtreecommitdiff
path: root/xserver/hw/xnest/Keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/hw/xnest/Keyboard.c')
-rw-r--r--xserver/hw/xnest/Keyboard.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/xserver/hw/xnest/Keyboard.c b/xserver/hw/xnest/Keyboard.c
index ae8375ee3..85deabab4 100644
--- a/xserver/hw/xnest/Keyboard.c
+++ b/xserver/hw/xnest/Keyboard.c
@@ -22,7 +22,6 @@ is" without express or implied warranty.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <xcb/xcb_keysyms.h>
#include <X11/keysym.h>
#include "screenint.h"
#include "inputstr.h"
@@ -138,7 +137,7 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
max_keycode - min_keycode + 1,
&mapWidth);
len = (max_keycode - min_keycode + 1) * mapWidth;
- keymap = (KeySym *) malloc(len * sizeof(KeySym));
+ keymap = xallocarray(len, sizeof(KeySym));
for (i = 0; i < len; ++i)
keymap[i] = keymap64[i];
XFree(keymap64);
@@ -252,7 +251,7 @@ xnestUpdateModifierState(unsigned int state)
for (key = 0; key < MAP_LENGTH; key++)
if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
- if (mask == XCB_MOD_MASK_LOCK) {
+ if (mask == LockMask) {
xnestQueueKeyEvent(KeyPress, key);
xnestQueueKeyEvent(KeyRelease, key);
}
@@ -270,7 +269,7 @@ xnestUpdateModifierState(unsigned int state)
for (key = 0; key < MAP_LENGTH; key++)
if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
xnestQueueKeyEvent(KeyPress, key);
- if (mask == XCB_MOD_MASK_LOCK)
+ if (mask == LockMask)
xnestQueueKeyEvent(KeyRelease, key);
break;
}