summaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2013-05-30 14:47:17 +0000
committerPierre Ossman <ossman@cendio.se>2013-05-30 14:47:17 +0000
commit0da2f1fd991cf05c046165b4c1fe425388d9f2ec (patch)
treedafffa969081c1c7c63e459d1eba35608f7087f1 /unix/xserver/hw/vnc
parent159cb83a0a818041c8dfc6f47029eb8385e373e0 (diff)
downloadtigervnc-0da2f1fd991cf05c046165b4c1fe425388d9f2ec.tar.gz
tigervnc-0da2f1fd991cf05c046165b4c1fe425388d9f2ec.zip
Even if we ignore the modifiers, we still have to respect
the active group when we go looking for the level 3 shift key. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5117 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/xserver/hw/vnc')
-rw-r--r--unix/xserver/hw/vnc/InputXKB.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/unix/xserver/hw/vnc/InputXKB.cc b/unix/xserver/hw/vnc/InputXKB.cc
index 7bc23778..4c04ef9f 100644
--- a/unix/xserver/hw/vnc/InputXKB.cc
+++ b/unix/xserver/hw/vnc/InputXKB.cc
@@ -210,20 +210,25 @@ unsigned InputDevice::getKeyboardState(void)
unsigned InputDevice::getLevelThreeMask(void)
{
+ unsigned state;
KeyCode keycode;
XkbDescPtr xkb;
XkbAction *act;
- keycode = keysymToKeycode(XK_ISO_Level3_Shift, 0, NULL);
+ /* Group state is still important */
+ state = getKeyboardState();
+ state &= ~0xff;
+
+ keycode = keysymToKeycode(XK_ISO_Level3_Shift, state, NULL);
if (keycode == 0) {
- keycode = keysymToKeycode(XK_Mode_switch, 0, NULL);
+ keycode = keysymToKeycode(XK_Mode_switch, state, NULL);
if (keycode == 0)
return 0;
}
xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
- act = XkbKeyActionPtr(xkb, keycode, 0);
+ act = XkbKeyActionPtr(xkb, keycode, state);
if (act == NULL)
return 0;
if (act->type != XkbSA_SetMods)
@@ -338,7 +343,7 @@ KeyCode InputDevice::pressLevelThree(void)
xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
- act = XkbKeyActionPtr(xkb, keycode, 0);
+ act = XkbKeyActionPtr(xkb, keycode, state);
if (act == NULL)
return 0;
if (act->type != XkbSA_SetMods)