aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 94480c45c..4c85145a9 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -2782,7 +2782,8 @@ int nxagentHandleXkbKeyboardStateEvent(XEvent *X)
{
XkbEvent *xkbev = (XkbEvent *) X;
- if (xkbev -> type == nxagentXkbInfo.EventBase + XkbEventCode &&
+ if (nxagentXkbInfo.EventBase != -1 &&
+ xkbev -> type == nxagentXkbInfo.EventBase + XkbEventCode &&
xkbev -> any.xkb_type == XkbStateNotify)
{
#ifdef TEST
@@ -3815,6 +3816,11 @@ int nxagentInitXkbKeyboardState(void)
XkbEvent *xkbev = (XkbEvent *) &X;
+ if (nxagentXkbInfo.EventBase == -1)
+ {
+ return 1;
+ }
+
#ifdef TEST
fprintf(stderr, "%s: Initializing XKB state.\n", __func__);
#endif