aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2016-12-11 12:41:26 +0100
committerPierre Ossman <ossman@cendio.se>2017-08-24 12:33:08 +0200
commitbb305ca3dbbc316c9742d36b0919226e15120add (patch)
tree4e02a61174797166a06c0987ef7919d2ed7f775c /unix/xserver
parent1668cfaef2fe7effb38f311d232d4f57a8703d11 (diff)
downloadtigervnc-bb305ca3dbbc316c9742d36b0919226e15120add.tar.gz
tigervnc-bb305ca3dbbc316c9742d36b0919226e15120add.zip
Add server side lock key sync heuristic
Based on QEMU's behaviour.
Diffstat (limited to 'unix/xserver')
-rw-r--r--unix/xserver/hw/vnc/Input.c6
-rw-r--r--unix/xserver/hw/vnc/Input.h2
-rw-r--r--unix/xserver/hw/vnc/InputXKB.c17
3 files changed, 0 insertions, 25 deletions
diff --git a/unix/xserver/hw/vnc/Input.c b/unix/xserver/hw/vnc/Input.c
index 33e8604b..1d7183b9 100644
--- a/unix/xserver/hw/vnc/Input.c
+++ b/unix/xserver/hw/vnc/Input.c
@@ -437,12 +437,6 @@ void vncKeyboardEvent(KeySym keysym, int down)
}
}
- /* We don't have lock synchronisation... */
- if (vncIsLockModifier(keycode, new_state)) {
- LOG_DEBUG("Ignoring lock key (e.g. caps lock)");
- return;
- }
-
/* No matches. Will have to add a new entry... */
if (keycode == 0) {
keycode = vncAddKeysym(keysym, state);
diff --git a/unix/xserver/hw/vnc/Input.h b/unix/xserver/hw/vnc/Input.h
index 11e88710..67b9c8db 100644
--- a/unix/xserver/hw/vnc/Input.h
+++ b/unix/xserver/hw/vnc/Input.h
@@ -53,8 +53,6 @@ size_t vncReleaseLevelThree(KeyCode *keys, size_t maxKeys);
KeyCode vncKeysymToKeycode(KeySym keysym, unsigned state, unsigned *new_state);
-int vncIsLockModifier(KeyCode keycode, unsigned state);
-
int vncIsAffectedByNumLock(KeyCode keycode);
KeyCode vncAddKeysym(KeySym keysym, unsigned state);
diff --git a/unix/xserver/hw/vnc/InputXKB.c b/unix/xserver/hw/vnc/InputXKB.c
index 2a3f7afb..a9bd11d1 100644
--- a/unix/xserver/hw/vnc/InputXKB.c
+++ b/unix/xserver/hw/vnc/InputXKB.c
@@ -485,23 +485,6 @@ KeyCode vncKeysymToKeycode(KeySym keysym, unsigned state, unsigned *new_state)
return 0;
}
-int vncIsLockModifier(KeyCode keycode, unsigned state)
-{
- XkbDescPtr xkb;
- XkbAction *act;
-
- xkb = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
-
- act = XkbKeyActionPtr(xkb, keycode, state);
- if (act == NULL)
- return 0;
-
- if (act->type != XkbSA_LockMods)
- return 0;
-
- return 1;
-}
-
int vncIsAffectedByNumLock(KeyCode keycode)
{
unsigned state;