[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/4] vnc: Adjust lock state sync logic with VNC_FEAT
From: |
Lei Li |
Subject: |
[Qemu-devel] [PATCH 3/4] vnc: Adjust lock state sync logic with VNC_FEATURE_LED_STATE |
Date: |
Thu, 25 Apr 2013 13:29:11 +0800 |
Signed-off-by: Lei Li <address@hidden>
---
ui/vnc.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index 44189d7..9ffa75b 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -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
--
1.7.7.6
- [Qemu-devel] [PATCH 0/4 v4] Support for LED state extension to Qemu VNC server, Lei Li, 2013/04/25
- [Qemu-devel] [PATCH 1/4] vnc: Add SCROLL lock key to kbd_leds, Lei Li, 2013/04/25
- [Qemu-devel] [PATCH 3/4] vnc: Adjust lock state sync logic with VNC_FEATURE_LED_STATE,
Lei Li <=
- [Qemu-devel] [PATCH 2/4] vnc: Support for LED state extension, Lei Li, 2013/04/25
- [Qemu-devel] [PATCH 4/4] doc: document the Pseudo-encoding of LED state, Lei Li, 2013/04/25
- Re: [Qemu-devel] [PATCH 0/4 v4] Support for LED state extension to Qemu VNC server, Anthony Liguori, 2013/04/25
- Re: [Qemu-devel] [PATCH 0/4 v4] Support for LED state extension to Qemu VNC server, Anthony Liguori, 2013/04/29