[gnome-settings-daemon/gnome-3-10] keyboard: Apply num-lock to newly connected keyboards



commit 61576eabf86d277df57e2fd1386170fbd6ecdc90
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 28 12:10:32 2014 +0100

    keyboard: Apply num-lock to newly connected keyboards
    
    before 34395459cc8f0da6f163736743bced441ef86390, apply_all_settings()
    and then apply_numlock() would sync up the numlock LED on a newly
    hotplugged device.
    34395459cc8f0da6f163736743bced441ef86390 removed that call, so devices
    now come up with the numlock LED off even when the numlock is on, and a
    subsequent state change will wrongly toggle it, i.e. LED off when numlock
    is on, LED on when numlock is off.
    
    This should really be fixed in the xserver but it's unlikely to happen,
    restoring this patch in gnome-settings-daemon seems the simplest solution
    for now.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722753

 plugins/keyboard/gsd-keyboard-manager.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/plugins/keyboard/gsd-keyboard-manager.c b/plugins/keyboard/gsd-keyboard-manager.c
index b18db49..308e17b 100644
--- a/plugins/keyboard/gsd-keyboard-manager.c
+++ b/plugins/keyboard/gsd-keyboard-manager.c
@@ -1199,6 +1199,7 @@ device_added_cb (GdkDeviceManager   *device_manager,
         source = gdk_device_get_source (device);
         if (source == GDK_SOURCE_KEYBOARD) {
                 g_debug ("New keyboard plugged in, applying all settings");
+                apply_numlock (manager);
                 apply_input_sources_settings (manager->priv->input_sources_settings, NULL, 0, manager);
                 run_custom_command (device, COMMAND_DEVICE_ADDED);
         }


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