spice: Use proper enum type for kbd led state
PATCH 1/1 spice: Use proper enum type for kbd led state
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.
--- ui/spice-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ui/spice-input.c +1 -1
@@ -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 */
Signature · 1 line
2.9.3
Quoted 8 lines · Jonathon Jongsma
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 <[email protected]>
Quoted 21 lines
--- ui/spice-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)ui/spice-input.c +1
-2@@ -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 */ --2.9.3
Quoted 1 line
--
Marc-André Lureau
Quoted 10 lines · Marc-André Lureau
On Thu, May 11, 2017 at 6:16 AM Jonathon Jongsma <[email protected]
Quoted 7 lines
wrote:
Although the Qemu and spice flags currently have the same value, it seems more correct to pass the spice flag values tospice_server_kbd_leds(), especially considering that this function already makes an effort to convert between the QEMU_*_LED and SPICE_KEYBOARD_MODIFIER_* values.
Quoted 5 lines
Quoted 1 line
Signed-off-by Jonathon Jongsma <[email protected]>Reviewed-by Marc-André Lureau <[email protected]>
Added to ui queue.
thanks,
Gerd