summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2017-09-15 15:34:24 +0200
committerPierre Ossman <ossman@cendio.se>2017-09-15 15:34:24 +0200
commit2df2a07b36190df7ec374dda1a8ed647e4cf80e4 (patch)
treea595bd3eb18d052ac953346124c4fbbb428c24a5
parent00dec78eb1a87dd6ee1d6c9937e7ce5f8b0495b2 (diff)
downloadtigervnc-2df2a07b36190df7ec374dda1a8ed647e4cf80e4.tar.gz
tigervnc-2df2a07b36190df7ec374dda1a8ed647e4cf80e4.zip
Handle XKB groups properly in x0vncserver
-rw-r--r--unix/x0vncserver/x0vncserver.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx
index a60a7277..f4dd6f99 100644
--- a/unix/x0vncserver/x0vncserver.cxx
+++ b/unix/x0vncserver/x0vncserver.cxx
@@ -373,8 +373,11 @@ public:
keycode <= xkb->max_key_code;
keycode++) {
KeySym cursym;
- unsigned int mods;
- XkbTranslateKeyCode(xkb, keycode, state.compat_state, &mods, &cursym);
+ unsigned int mods, out_mods;
+ // XkbStateFieldFromRec() doesn't work properly because
+ // state.lookup_mods isn't properly updated, so we do this manually
+ mods = XkbBuildCoreState(XkbStateMods(&state), state.group);
+ XkbTranslateKeyCode(xkb, keycode, mods, &out_mods, &cursym);
if (cursym == keysym)
break;
}