diff options
author | Pierre Ossman <ossman@cendio.se> | 2013-05-23 11:40:30 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2013-05-23 11:40:30 +0000 |
commit | 7138a6c05d6140018dc4c44f71f09e4fc8ddcf86 (patch) | |
tree | ffbed1d20d0c903768ec93b11b5f94674b3a696b | |
parent | 3e78fcbb4cbf5a870ba00880e9eb44e13a3da8a2 (diff) | |
download | tigervnc-7138a6c05d6140018dc4c44f71f09e4fc8ddcf86.tar.gz tigervnc-7138a6c05d6140018dc4c44f71f09e4fc8ddcf86.zip |
Relax the requirements on addKeysym() so that it can add new
entries that still require modifying the current modifier state.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5104 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r-- | unix/xserver/hw/vnc/Input.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/unix/xserver/hw/vnc/Input.cc b/unix/xserver/hw/vnc/Input.cc index f1f8e112..5f96f380 100644 --- a/unix/xserver/hw/vnc/Input.cc +++ b/unix/xserver/hw/vnc/Input.cc @@ -507,7 +507,16 @@ void InputDevice::keyEvent(rdr::U32 keysym, bool down) vlog.info("Added unknown keysym 0x%x to keycode %d", keysym, keycode); - new_state = state; + /* + * The state given to addKeysym() is just a hint and + * the actual result might still require some state + * changes. + */ + keycode = keysymToKeycode(keysym, state, &new_state); + if (keycode == 0) { + vlog.error("Newly added keysym 0x%x cannot be generated", keysym); + return; + } } /* |