[spice-gtk 6/9] Avoid too much #ifdef inside set_keyboard_lock_modifiers functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 src/keyboard-modifiers.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/keyboard-modifiers.c b/src/keyboard-modifiers.c
index b6c9d8f..dd13fad 100644
--- a/src/keyboard-modifiers.c
+++ b/src/keyboard-modifiers.c
@@ -140,11 +140,9 @@ static void set_keyboard_led(Display *x_display, SpiceLed led, int set)
         return;
     }
 }
-#endif
 
 void set_keyboard_lock_modifiers(guint32 modifiers)
 {
-#if defined(HAVE_X11_XKBLIB_H)
     Display *x_display;
 
     GdkScreen *screen = gdk_screen_get_default();
@@ -158,7 +156,12 @@ void set_keyboard_lock_modifiers(guint32 modifiers)
     set_keyboard_led(x_display, CAPS_LOCK_LED, !!(modifiers & SPICE_INPUTS_CAPS_LOCK));
     set_keyboard_led(x_display, NUM_LOCK_LED, !!(modifiers & SPICE_INPUTS_NUM_LOCK));
     set_keyboard_led(x_display, SCROLL_LOCK_LED, !!(modifiers & SPICE_INPUTS_SCROLL_LOCK));
+}
+
 #else
+
+void set_keyboard_lock_modifiers(guint32 modifiers)
+{
     g_warning("set_keyboard_lock_modifiers not implemented");
-#endif
 }
+#endif
-- 
2.7.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]