From: Pierre Ossman Date: Fri, 15 Sep 2017 13:34:24 +0000 (+0200) Subject: Handle XKB groups properly in x0vncserver X-Git-Tag: v1.8.90~108 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2df2a07b36190df7ec374dda1a8ed647e4cf80e4;p=tigervnc.git Handle XKB groups properly in x0vncserver --- 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; }