From b03019b0fa2fe2c80c438fe938cde71a2f6e08d0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 22 Apr 2008 17:48:15 +0000 Subject: [PATCH] Make xrandr plugin survive if xrandr is missing --- gnome-settings-daemon.spec | 8 +++++++- xrandr-missingok.patch | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 xrandr-missingok.patch diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 13b7547..6f1b05b 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 2.22.1 -Release: 0.2008.03.26.5%{?dist} +Release: 0.2008.03.26.6%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -34,6 +34,8 @@ Patch2: gnome-settings-daemon-2.21.91-ignore-model-if-evdev.patch # http://bugzilla.gnome.org/show_bug.cgi?id=524499 Patch3: gsd-mouse-too-much-grab.patch Patch4: gnome-settings-daemon-2.22.1-hide-white-screen.patch +# survive xrandr being absent (such as on Xnest in sabayon) +Patch5: xrandr-missingok.patch %description A daemon to share settings from GNOME to other applications. It also @@ -59,6 +61,7 @@ pushd plugins/mouse/ %patch3 -p0 -b .no-eat-keys popd %patch4 -p1 -b .hide-white-screen +%patch5 -p1 -b .xrandr-missingok %build %configure --enable-static=no --enable-profiling @@ -140,6 +143,9 @@ fi %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Tue Apr 22 2008 Matthias Clasen - 2.22.1-2008.03.26.6 +- Make the xrandr plugin survive the absence of Xrandr + * Sat Apr 5 2008 - Soren Sandmann - 2.22.1-2008.03.26.5 - Update randr plugin diff --git a/xrandr-missingok.patch b/xrandr-missingok.patch new file mode 100644 index 0000000..8b21497 --- /dev/null +++ b/xrandr-missingok.patch @@ -0,0 +1,15 @@ +diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.xrandr-missingok gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c +--- gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.xrandr-missingok 2008-04-22 13:39:45.000000000 -0400 ++++ gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c 2008-04-22 13:39:50.000000000 -0400 +@@ -146,6 +146,11 @@ gsd_xrandr_manager_start (GsdXrandrManag + { + g_debug ("Starting xrandr manager"); + ++ if (manager->priv->rw_screen == NULL) { ++ g_set_error (error, 0, 0, "Failed to initialize XRandr extension"); ++ return FALSE; ++ } ++ + manager->priv->running = TRUE; + + if (manager->priv->keycode) {