[Spice-devel] [PATCH] [spice-gtk] keyboard: wrong defined macro for WIN32

Cody Chan int64ago at gmail.com
Wed Aug 13 01:45:12 PDT 2014


On windows client, there's no effect for guest when
enabling CAPS_LOCK/NUM_LOCK/SCROLL_LOCK on
(because of the delay, guest may take the effect for several seconds).
There's a wrong defined macro, then <modifiers> is ALWAYS 0,
and the keyboard state of guest is synchronized with the state client
by spice_gtk_session_sync_keyboard_modifiers_for_channel(...).

​
​
---
 gtk/spice-gtk-session.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c
index db5c53c..1905a25 100644
--- a/gtk/spice-gtk-session.c
+++ b/gtk/spice-gtk-session.c
@@ -140,7 +140,7 @@ static guint32 get_keyboard_lock_modifiers(void)
     if (keyboard_state.led_mask & 0x04) {
         modifiers |= SPICE_INPUTS_SCROLL_LOCK;
     }
-#elif defined(win32)
+#elif defined(WIN32)
     if (GetKeyState(VK_CAPITAL) & 1) {
         modifiers |= SPICE_INPUTS_CAPS_LOCK;
     }
--
1.9.3
​

-- 
QSBDT0RFUiBGUk9NIFJJRVNUIE9GIENUU0VV
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20140813/00b32418/attachment.html>


More information about the Spice-devel mailing list