aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2011-01-17 10:58:08 +0000
committerAdam Tkac <atkac@redhat.com>2011-01-17 10:58:08 +0000
commit6959da13906a761b7ac5b186761315000b3f21cb (patch)
tree45b6d307da753f1dd4032c8cdb8ebb225458b9f8 /unix/xserver/hw
parent59b6253adb7226991d76b8659434f54490c1be65 (diff)
downloadtigervnc-6959da13906a761b7ac5b186761315000b3f21cb.tar.gz
tigervnc-6959da13906a761b7ac5b186761315000b3f21cb.zip
[Bugfix] Handle situation when viewer doesn't send the key release event well.
Happens for example with TightVNC 1.3.10 viewer during following sequence: "press shift" + "press a" + "release shift" + "release a" git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4237 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/xserver/hw')
-rw-r--r--unix/xserver/hw/vnc/Input.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/unix/xserver/hw/vnc/Input.cc b/unix/xserver/hw/vnc/Input.cc
index ca9bae3e..f36244a4 100644
--- a/unix/xserver/hw/vnc/Input.cc
+++ b/unix/xserver/hw/vnc/Input.cc
@@ -781,6 +781,16 @@ ModeSwitchFound:
}
}
}
+#else
+ /*
+ * If you would like to press a key which is already pressed then
+ * viewer didn't send the "release" event. In this case release it
+ * before the press.
+ */
+ if (IS_PRESSED(keyc, kc) && down) {
+ vlog.debug("KeyRelease for %d wasn't sent, releasing", kc);
+ pressKey(keyboardDev, kc, false, "fixing keycode");
+ }
#endif
if (maxKeysPerMod != 0) {