aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2018-06-21 22:16:58 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-07-03 16:13:43 +0200
commit7a627e644242bdbb00e5cdac4536c64268454af3 (patch)
tree1d78a5f011fa709514c3d155eff294185338fe5b /nx-X11
parent9834951239bbbfb24dfc919b7e321e21e14d3222 (diff)
downloadnx-libs-7a627e644242bdbb00e5cdac4536c64268454af3.tar.gz
nx-libs-7a627e644242bdbb00e5cdac4536c64268454af3.tar.bz2
nx-libs-7a627e644242bdbb00e5cdac4536c64268454af3.zip
Some small Keyboard.c improvements
as in xorg-xserver upstream's hw/xnest/Keyboard.c
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 758ec9275..51a11b4f4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -704,7 +704,7 @@ int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff)
int mapWidth;
int min_keycode, max_keycode;
KeySymsRec keySyms;
- CARD8 modmap[256];
+ CARD8 modmap[MAP_LENGTH];
int i, j;
XKeyboardState values;
char *model = NULL, *layout = NULL;
@@ -765,7 +765,7 @@ N/A
#ifdef _XSERVER64
{
KeySym64 *keymap64;
- int i, len;
+ int len;
keymap64 = XGetKeyboardMapping(nxagentDisplay,
min_keycode,
max_keycode - min_keycode + 1,
@@ -807,8 +807,7 @@ N/A
nxagentCapsMask = 0;
nxagentNumlockMask = 0;
- for (i = 0; i < 256; i++)
- modmap[i] = 0;
+ memset(modmap, 0, sizeof(modmap));
for (j = 0; j < 8; j++)
for(i = 0; i < modifier_keymap->max_keypermod; i++) {
CARD8 keycode;
@@ -823,6 +822,7 @@ N/A
}
}
XFreeModifiermap(modifier_keymap);
+ modifier_keymap = NULL;
nxagentCheckRemoteKeycodes();