[gnome-settings-daemon] keyboard: Make sure the XKB group in use is always what we want



commit c2d53d62cc31409bcb2cd5cc21ab0980bdfacabb
Author: Rui Matos <tiagomatos gmail com>
Date:   Sun Mar 31 21:56:01 2013 +0200

    keyboard: Make sure the XKB group in use is always what we want
    
    The layout we want is always in the first XKB group index so we should
    enforce it to make sure we never end up with the wrong one.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696996

 plugins/keyboard/gsd-keyboard-manager.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/plugins/keyboard/gsd-keyboard-manager.c b/plugins/keyboard/gsd-keyboard-manager.c
index cdb372b..cb43f15 100644
--- a/plugins/keyboard/gsd-keyboard-manager.c
+++ b/plugins/keyboard/gsd-keyboard-manager.c
@@ -669,6 +669,11 @@ upload_xkb_description (const gchar          *rules_file_path,
         XkbDescRec *xkb_desc;
         gchar *rules_file;
 
+        /* The layout we want is always in the first XKB group index
+         * so we should enforce it to make sure we never end up with
+         * the wrong one. */
+        XkbLockGroup (display, XkbUseCoreKbd, 0);
+
         /* Upload it to the X server using the same method as setxkbmap */
         xkb_desc = XkbGetKeyboardByName (display,
                                          XkbUseCoreKbd,


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