diff options
| author | Lei Li | 2013-04-25 07:29:11 +0200 |
|---|---|---|
| committer | Anthony Liguori | 2013-04-29 15:28:51 +0200 |
| commit | e7b2aaccd94a68c7927cae7ca47ced1bddc4f448 (patch) | |
| tree | cb0a3553678fb604c2f994a5b1fdb7f789a3225a /ui | |
| parent | vnc: Support for LED state extension (diff) | |
| download | qemu-e7b2aaccd94a68c7927cae7ca47ced1bddc4f448.tar.gz qemu-e7b2aaccd94a68c7927cae7ca47ced1bddc4f448.tar.xz qemu-e7b2aaccd94a68c7927cae7ca47ced1bddc4f448.zip | |
vnc: Adjust lock state sync logic with VNC_FEATURE_LED_STATE
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1366867752-11578-4-git-send-email-lilei@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/vnc.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1613,7 +1613,11 @@ static void do_key_event(VncState *vs, int down, int keycode, int sym) break; } + /* Turn off the lock state sync logic if the client support the led + state extension. + */ if (down && vs->vd->lock_key_sync && + !vnc_has_feature(vs, VNC_FEATURE_LED_STATE) && keycode_is_keypad(vs->vd->kbd_layout, keycode)) { /* If the numlock state needs to change then simulate an additional keypress before sending this one. This will happen if the user @@ -1633,6 +1637,7 @@ static void do_key_event(VncState *vs, int down, int keycode, int sym) } if (down && vs->vd->lock_key_sync && + !vnc_has_feature(vs, VNC_FEATURE_LED_STATE) && ((sym >= 'A' && sym <= 'Z') || (sym >= 'a' && sym <= 'z'))) { /* If the capslock state needs to change then simulate an additional keypress before sending this one. This will happen if the user |
