From 9e6f87e20d8a9145be9faca0502b23de7809c5e4 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sun, 5 Nov 2017 02:02:58 +0100 Subject: 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. --- nx-X11/programs/Xserver/xkb/xkbUtils.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nx-X11/programs/Xserver/xkb/xkbUtils.c') 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); -- cgit v1.2.3