[spice-gtk 8/9] Add can_set_keyboard_lock_modifiers function

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

 



Allows to understand if we can set client modifiers

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 src/keyboard-modifiers.c | 13 +++++++++++++
 src/keyboard-modifiers.h |  1 +
 2 files changed, 14 insertions(+)

diff --git a/src/keyboard-modifiers.c b/src/keyboard-modifiers.c
index cb019c9..5bfbb14 100644
--- a/src/keyboard-modifiers.c
+++ b/src/keyboard-modifiers.c
@@ -162,6 +162,10 @@ void set_keyboard_lock_modifiers(guint32 modifiers)
     set_keyboard_led(x_display, SCROLL_LOCK_LED, !!(modifiers & SPICE_INPUTS_SCROLL_LOCK));
 }
 
+gboolean can_set_keyboard_lock_modifiers(void)
+{
+    return TRUE;
+}
 #elif defined(G_OS_WIN32)
 
 // Some definitions from kbd.h to define internal layout file structures
@@ -692,10 +696,19 @@ void set_keyboard_lock_modifiers(guint32 modifiers)
     }
 }
 
+gboolean can_set_keyboard_lock_modifiers(void)
+{
+    return TRUE;
+}
 #else
 
 void set_keyboard_lock_modifiers(guint32 modifiers)
 {
     g_warning("set_keyboard_lock_modifiers not implemented");
 }
+
+gboolean can_set_keyboard_lock_modifiers(void)
+{
+    return FALSE;
+}
 #endif
diff --git a/src/keyboard-modifiers.h b/src/keyboard-modifiers.h
index 016be84..c17cf82 100644
--- a/src/keyboard-modifiers.h
+++ b/src/keyboard-modifiers.h
@@ -28,6 +28,7 @@
 G_BEGIN_DECLS
 
 guint32 get_keyboard_lock_modifiers(void);
+gboolean can_set_keyboard_lock_modifiers(void);
 void set_keyboard_lock_modifiers(guint32 modifiers);
 
 G_END_DECLS
-- 
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]