try harder to keep gdms keyboard layout

This commit is contained in:
Matthias Clasen 2008-09-06 00:08:22 +00:00
parent c7bdda5b64
commit 1c7dc921bf
2 changed files with 20 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: gnome-settings-daemon Name: gnome-settings-daemon
Version: 2.23.91 Version: 2.23.91
Release: 4%{?dist} Release: 5%{?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
@ -34,6 +34,8 @@ BuildRequires: autoconf, automake, libtool, intltool
Patch2: gnome-settings-daemon-2.21.91-ignore-model-if-evdev.patch Patch2: gnome-settings-daemon-2.21.91-ignore-model-if-evdev.patch
Patch6: gnome-settings-daemon-2.23.4-drop-sample-cache.patch Patch6: gnome-settings-daemon-2.23.4-drop-sample-cache.patch
Patch7: gnome-settings-daemon-2.23.91-fnf7-cycle.patch Patch7: gnome-settings-daemon-2.23.91-fnf7-cycle.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=551062
Patch11: keyboard-layout-variants.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
@ -56,6 +58,7 @@ developing applications that use %{name}.
%patch2 -p1 -b .ignore-layout-if-using-evdev %patch2 -p1 -b .ignore-layout-if-using-evdev
%patch6 -p1 -b .drop-sample-cache %patch6 -p1 -b .drop-sample-cache
%patch7 -p1 -b .fnf7-cycle %patch7 -p1 -b .fnf7-cycle
%patch11 -p1 -b .keyboard-layout-variants
%build %build
aclocal aclocal
@ -155,6 +158,9 @@ fi
%{_libdir}/pkgconfig/gnome-settings-daemon.pc %{_libdir}/pkgconfig/gnome-settings-daemon.pc
%changelog %changelog
* Fri Sep 5 2008 Matthias Clasen <mclasen@redhat.com> - 2.23.91-5
- Try harder to use the keyboard layout that gdm tells us
* Tue Sep 04 2008 Soren Sandmann <sandmann@redhat.com> - 2.23.91-4 * Tue Sep 04 2008 Soren Sandmann <sandmann@redhat.com> - 2.23.91-4
- Use the fn-F7 key, not the F7 key. - Use the fn-F7 key, not the F7 key.

View File

@ -0,0 +1,13 @@
--- gnome-settings-daemon-2.23.91/plugins/keyboard/gsd-keyboard-xkb.c 2008-09-05 18:49:58.000000000 -0400
+++ hacked/plugins/keyboard/gsd-keyboard-xkb.c 2008-09-05 18:48:11.000000000 -0400
@@ -172,7 +172,9 @@
GSList *l;
int i;
for (i = 0, l = current_kbd_config.layouts_variants; l; i++, l = l->next) {
- if (strcmp (gdm_keyboard_layout, l->data) == 0) {
+ char *lv = l->data;
+ size_t len = strlen (gdm_keyboard_layout);
+ if (strncmp (lv, gdm_keyboard_layout, len) == 0 && (lv[len] == '\0' || lv[len] == '\t')) {
xkl_engine_lock_group (current_config.engine, i);
break;
}