aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/xkb/xkbUtils.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2017-11-05 02:02:58 +0100
committerMihai Moldovan <ionic@ionic.de>2018-02-28 00:40:45 +0100
commit9e6f87e20d8a9145be9faca0502b23de7809c5e4 (patch)
treeb6fc1a6f3e8496b0e57cb5ebfc8a8be878b82b64 /nx-X11/programs/Xserver/xkb/xkbUtils.c
parenta6cb8583adb16f299e968be4a8e99e903966e1d8 (diff)
downloadnx-libs-9e6f87e20d8a9145be9faca0502b23de7809c5e4.tar.gz
nx-libs-9e6f87e20d8a9145be9faca0502b23de7809c5e4.tar.bz2
nx-libs-9e6f87e20d8a9145be9faca0502b23de7809c5e4.zip
Lift xkb to xorg-xserver-7.1/1.1.0 state
In XORG-7_1 xkbconfig.c had been dropped. We must keep this file because it is used by hw/nxagent/Keyboard.c to load the xkb configuration file. Maybe we should move the relevant code to there or drop xkb configuration file support from nxagent.
Diffstat (limited to 'nx-X11/programs/Xserver/xkb/xkbUtils.c')
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbUtils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/xkb/xkbUtils.c b/nx-X11/programs/Xserver/xkb/xkbUtils.c
index f4b7db3c6..4adcc878d 100644
--- a/nx-X11/programs/Xserver/xkb/xkbUtils.c
+++ b/nx-X11/programs/Xserver/xkb/xkbUtils.c
@@ -674,6 +674,9 @@ CARD16 grp_mask;
XkbStatePtr state= &xkbi->state;
XkbCompatMapPtr map;
+ if (!state || !xkbi->desc || !xkbi->desc->ctrls || !xkbi->desc->compat)
+ return;
+
map= xkbi->desc->compat;
grp_mask= map->groups[state->group].mask;
state->compat_state = state->mods|grp_mask;
@@ -733,6 +736,9 @@ XkbStatePtr state= &xkbi->state;
XkbControlsPtr ctrls= xkbi->desc->ctrls;
unsigned char grp;
+ if (!state || !ctrls)
+ return;
+
state->mods= (state->base_mods|state->latched_mods);
state->mods|= state->locked_mods;
state->lookup_mods= state->mods&(~ctrls->internal.mask);