summaryrefslogtreecommitdiff
path: root/xserver/hw/xnest/Keyboard.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2016-05-29 12:02:41 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2016-05-29 12:02:41 +0000
commit4a991716ac65d28a68f9943d54c4b74ad0b58f65 (patch)
treec037c3fe64bb15ea67dbf03a96783a8b04085371 /xserver/hw/xnest/Keyboard.c
parent549cb8bcb6bdd3a7d44f3b9fdc003df777b2b0d2 (diff)
Update to xserver 1.18.3. Tested by shadchin@ and naddy@.
Note that indirect GLX is now disbled by default.
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;
}