[gnome-settings-daemon/wip/settings-relocation: 9/10] keyboard: Apply numlock/bell settings on X11 only.



commit 1245cb6b2ba1b7974e649dcceb2e456f5d91d049
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Dec 17 15:18:05 2014 +0100

    keyboard: Apply numlock/bell settings on X11 only.
    
    These are not a windowing/desktop thing on wayland, so just ignore these
    there at the moment.

 plugins/keyboard/gsd-keyboard-manager.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/plugins/keyboard/gsd-keyboard-manager.c b/plugins/keyboard/gsd-keyboard-manager.c
index 96c03c4..55ac2d0 100644
--- a/plugins/keyboard/gsd-keyboard-manager.c
+++ b/plugins/keyboard/gsd-keyboard-manager.c
@@ -392,6 +392,9 @@ set_devicepresence_handler (GsdKeyboardManager *manager)
 {
         GdkDeviceManager *device_manager;
 
+        if (gnome_settings_is_wayland ())
+                return;
+
         device_manager = gdk_display_get_device_manager (gdk_display_get_default ());
 
         manager->priv->device_added_id = g_signal_connect (G_OBJECT (device_manager), "device-added",
@@ -734,12 +737,14 @@ start_keyboard_idle_cb (GsdKeyboardManager *manager)
                                   localed_proxy_ready,
                                   manager);
 
-        /* apply current settings before we install the callback */
-        g_debug ("Started the keyboard plugin, applying all settings");
-        apply_all_settings (manager);
+        if (!gnome_settings_is_wayland ()) {
+                /* apply current settings before we install the callback */
+                g_debug ("Started the keyboard plugin, applying all settings");
+                apply_all_settings (manager);
 
-        g_signal_connect (G_OBJECT (manager->priv->settings), "changed",
-                          G_CALLBACK (settings_changed), manager);
+                g_signal_connect (G_OBJECT (manager->priv->settings), "changed",
+                                  G_CALLBACK (settings_changed), manager);
+        }
 
        install_xkb_filter (manager);
 


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