fix keyboard layout handling

This commit is contained in:
Matthias Clasen 2008-10-01 03:32:08 +00:00
parent d48690b289
commit c2a24c59c8
2 changed files with 37 additions and 1 deletions

29
fix-gdm-layout.patch Normal file
View File

@ -0,0 +1,29 @@
diff -up gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c.fix-gdm-layout gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c
--- gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c.fix-gdm-layout 2008-09-30 22:56:41.000000000 -0400
+++ gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c 2008-09-30 22:58:52.000000000 -0400
@@ -142,6 +142,7 @@ apply_xkb_settings (void)
{
GConfClient *conf_client;
GkbdKeyboardConfig current_sys_kbd_config;
+ int group_to_activate = -1;
if (!inited_ok)
return;
@@ -175,7 +176,7 @@ apply_xkb_settings (void)
for (i = 0, l = current_kbd_config.layouts_variants; l; i++, l = l->next) {
char *lv = l->data;
if (strncmp (lv, gdm_keyboard_layout, len) == 0 && (lv[len] == '\0' || lv[len] == '\t')) {
- xkl_engine_lock_group (current_config.engine, i);
+ group_to_activate = i;
break;
}
}
@@ -206,6 +207,8 @@ apply_xkb_settings (void)
xkl_debug (100,
"Actual KBD configuration was not changed: redundant notification\n");
+ if (group_to_activate != -1)
+ xkl_engine_lock_group (current_config.engine, group_to_activate);
gkbd_keyboard_config_term (&current_sys_kbd_config);
}

View File

@ -1,6 +1,6 @@
Name: gnome-settings-daemon Name: gnome-settings-daemon
Version: 2.24.0 Version: 2.24.0
Release: 2%{?dist} Release: 3%{?dist}
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
Group: System Environment/Daemons Group: System Environment/Daemons
@ -38,6 +38,9 @@ Patch7: gnome-settings-daemon-2.23.91-fnf7-cycle.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=552857 # http://bugzilla.gnome.org/show_bug.cgi?id=552857
Patch8: gnome-settings-daemon-2.23.92-fade.patch Patch8: gnome-settings-daemon-2.23.92-fade.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=554525
Patch9: fix-gdm-layout.patch
%description %description
A daemon to share settings from GNOME to other applications. It also A daemon to share settings from GNOME to other applications. It also
handles global keybindings, as well as a number of desktop-wide settings. handles global keybindings, as well as a number of desktop-wide settings.
@ -60,6 +63,7 @@ developing applications that use %{name}.
%patch6 -p1 -b .drop-sample-cache %patch6 -p1 -b .drop-sample-cache
%patch7 -p1 -b .fnf7-cycle %patch7 -p1 -b .fnf7-cycle
%patch8 -p1 -b .fade %patch8 -p1 -b .fade
%patch9 -p1 -b .fix-gdm-layout
%build %build
aclocal aclocal
@ -159,6 +163,9 @@ fi
%{_libdir}/pkgconfig/gnome-settings-daemon.pc %{_libdir}/pkgconfig/gnome-settings-daemon.pc
%changelog %changelog
* Tue Sep 30 2008 Matthias Clasen <mclasen@redhat.com> - 2.24.0-3
- Fix the picking up of the gdm keyboard layout
* Wed Sep 28 2008 Ray Strode <rstrode@redhat.com> - 2.24.0-2 * Wed Sep 28 2008 Ray Strode <rstrode@redhat.com> - 2.24.0-2
- Don't draw background twice at startup - Don't draw background twice at startup