[spice-gtk v3 6/7] 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/spice-gtk-keyboard.c | 13 +++++++++++++
 src/spice-gtk-keyboard.h |  2 ++
 2 files changed, 15 insertions(+)

diff --git a/src/spice-gtk-keyboard.c b/src/spice-gtk-keyboard.c
index b0f6b86..22d9f60 100644
--- a/src/spice-gtk-keyboard.c
+++ b/src/spice-gtk-keyboard.c
@@ -161,6 +161,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 */
@@ -566,10 +570,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/spice-gtk-keyboard.h b/src/spice-gtk-keyboard.h
index 499b271..f3f2a1f 100644
--- a/src/spice-gtk-keyboard.h
+++ b/src/spice-gtk-keyboard.h
@@ -30,6 +30,8 @@ G_BEGIN_DECLS
 G_GNUC_INTERNAL
 guint32 get_keyboard_lock_modifiers(void);
 G_GNUC_INTERNAL
+gboolean can_set_keyboard_lock_modifiers(void);
+G_GNUC_INTERNAL
 void set_keyboard_lock_modifiers(guint32 modifiers);
 
 #ifdef G_OS_WIN32
-- 
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]