From e5e67542a4f21b377baabd5db456ec52f6225fa8 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 16 Feb 2011 18:40:55 +0000 Subject: [PATCH] Fix crasher when media keys GSettings value changes --- ...ys-Fix-crash-when-keybindings-change.patch | 28 +++++++++++++++++++ gnome-settings-daemon.spec | 7 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0001-media-keys-Fix-crash-when-keybindings-change.patch diff --git a/0001-media-keys-Fix-crash-when-keybindings-change.patch b/0001-media-keys-Fix-crash-when-keybindings-change.patch new file mode 100644 index 0000000..4c6742c --- /dev/null +++ b/0001-media-keys-Fix-crash-when-keybindings-change.patch @@ -0,0 +1,28 @@ +From 89b4b516edfd5ec19f8987d63624c28fc2f30f8f Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Wed, 16 Feb 2011 16:26:45 +0000 +Subject: [PATCH] media-keys: Fix crash when keybindings change + +We need to skip over hard-coded keys which don't have a +key name. +--- + plugins/media-keys/gsd-media-keys-manager.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c +index 1c1b2cf..7d42f49 100644 +--- a/plugins/media-keys/gsd-media-keys-manager.c ++++ b/plugins/media-keys/gsd-media-keys-manager.c +@@ -292,6 +292,9 @@ update_kbd_cb (GSettings *settings, + + /* Find the key that was modified */ + for (i = 0; i < HANDLED_KEYS; i++) { ++ /* Skip over hard-coded keys */ ++ if (keys[i].settings_key == NULL) ++ continue; + if (strcmp (key, keys[i].settings_key) == 0) { + char *tmp; + Key *key; +-- +1.7.4 + diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 7920b6c..e434caf 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 2.91.9 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -36,6 +36,7 @@ BuildRequires: libxklavier-devel BuildRequires: gsettings-desktop-schemas-devel >= 0.1.2 Patch0: 0001-datetime-Fix-gsd_datetime_check_tz_name-never-workin.patch +Patch1: 0001-media-keys-Fix-crash-when-keybindings-change.patch # change font rendering #Patch3: slight-hinting.patch @@ -56,6 +57,7 @@ developing applications that use %{name}. %prep %setup -q %patch0 -p1 -b .tz-setting +%patch1 -p1 -b .media-keys #%patch3 -p1 -b .slight-hinting %build @@ -121,6 +123,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Wed Feb 16 2011 Bastien Nocera 2.91.9-6 +- Fix crasher when media keys GSettings value changes + * Sun Feb 13 2011 Christopher Aillon - 2.91.9-5 - Rebuild for new libxklavier