spice: Use proper enum type for kbd led state
authorJonathon Jongsma <jjongsma@redhat.com>
Wed, 10 May 2017 20:20:06 +0000 (15:20 -0500)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 14 Jun 2017 07:51:45 +0000 (09:51 +0200)
Although the Qemu and spice flags currently have the same value, it
seems more correct to pass the spice flag values to
spice_server_kbd_leds(), especially considering that this function
already makes an effort to convert between the QEMU_*_LED and
SPICE_KEYBOARD_MODIFIER_* values.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20170510202006.31737-1-jjongsma@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/spice-input.c

index 86293dd2ce34ccd3f821d7e10032f4035954eca8..918580239d5a3a28c0a94eae4e9d3ba5b7b66a10 100644 (file)
@@ -87,7 +87,7 @@ static void kbd_leds(void *opaque, int ledstate)
     if (ledstate & QEMU_CAPS_LOCK_LED) {
         kbd->ledstate |= SPICE_KEYBOARD_MODIFIER_FLAGS_CAPS_LOCK;
     }
-    spice_server_kbd_leds(&kbd->sin, ledstate);
+    spice_server_kbd_leds(&kbd->sin, kbd->ledstate);
 }
 
 /* mouse bits */