[gnome-settings-daemon/f14/master] - Use the X.org monitors configuration by default (#623824)

Bastien Nocera hadess at fedoraproject.org
Fri Nov 5 16:06:44 UTC 2010


commit 84debb7cb63b588f19456f7f6d9c0bf066a3c23a
Author: Bastien Nocera <hadess at hadess.net>
Date:   Fri Nov 5 16:06:38 2010 +0000

    - Use the X.org monitors configuration by default (#623824)

 ...conf-key-for-disabling-boot-time-configur.patch |   75 ++++++++++++++++++++
 ...andr-Use-Xorg-monitor-settings-by-default.patch |   26 +++++++
 gnome-settings-daemon.spec                         |   11 +++-
 3 files changed, 111 insertions(+), 1 deletions(-)
---
diff --git a/0001-RANDR-Add-gconf-key-for-disabling-boot-time-configur.patch b/0001-RANDR-Add-gconf-key-for-disabling-boot-time-configur.patch
new file mode 100644
index 0000000..b7b790c
--- /dev/null
+++ b/0001-RANDR-Add-gconf-key-for-disabling-boot-time-configur.patch
@@ -0,0 +1,75 @@
+From b4bb7ec55224d5615d25ed78acc302bcdf06ebe1 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt at ubuntu.com>
+Date: Tue, 5 Oct 2010 11:30:46 +0200
+Subject: [PATCH 1/2] RANDR - Add gconf key for disabling boot time configuration
+
+In a lot of situations it is undesirable to have g-s-d change the XRandR
+settings, because it overrides X.org customizations, leads to unnecessary mode
+switches, or increases boot time.
+
+Add a gconf key "use_xorg_monitor_settings" to disable
+apply_default_boot_configuration(), in which case the XRandR configuration will
+not be touched unless there is a global or per-user configuration file.
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=631388
+Bug-Ubuntu: https://launchpad.net/bugs/640807
+---
+ data/apps_gnome_settings_daemon_xrandr.schemas.in |   19 +++++++++++++++++++
+ plugins/xrandr/gsd-xrandr-manager.c               |    4 +++-
+ 2 files changed, 22 insertions(+), 1 deletions(-)
+
+diff --git a/data/apps_gnome_settings_daemon_xrandr.schemas.in b/data/apps_gnome_settings_daemon_xrandr.schemas.in
+index d8442ae..082197e 100644
+--- a/data/apps_gnome_settings_daemon_xrandr.schemas.in
++++ b/data/apps_gnome_settings_daemon_xrandr.schemas.in
+@@ -15,6 +15,25 @@
+             </locale>
+         </schema>
+ 	<schema>
++	    <key>/schemas/apps/gnome_settings_daemon/xrandr/use_xorg_monitor_settings</key>
++	    <applyto>/apps/gnome_settings_daemon/xrandr/use_xorg_monitor_settings</applyto>
++            <owner>gnome</owner>
++	    <type>bool</type>
++            <default>false</default>
++            <locale name="C">
++	        <short>Do not touch monitor configuration</short>
++		<long>Usually, gnome-settings-daemon configures internal and
++		    external monitors according to the
++		    turn_on_external_monitors_at_startup and
++		    turn_on_laptop_monitor_at_startup settings and determines
++		    an appropriate cloning/side-by-side mode. Setting this key
++		    to True disables this, and the monitor settings are not
++		    touched at all (unless there is an explicit user
++		    configuration).
++		</long>
++            </locale>
++        </schema>
++	<schema>
+ 	    <key>/schemas/apps/gnome_settings_daemon/xrandr/turn_on_external_monitors_at_startup</key>
+ 	    <applyto>/apps/gnome_settings_daemon/xrandr/turn_on_external_monitors_at_startup</applyto>
+             <owner>gnome</owner>
+diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
+index 06ef2b8..a3e15b8 100644
+--- a/plugins/xrandr/gsd-xrandr-manager.c
++++ b/plugins/xrandr/gsd-xrandr-manager.c
+@@ -61,6 +61,7 @@
+ 
+ #define CONF_DIR "/apps/gnome_settings_daemon/xrandr"
+ #define CONF_KEY_SHOW_NOTIFICATION_ICON (CONF_DIR "/show_notification_icon")
++#define CONF_KEY_USE_XORG_MONITOR_SETTINGS		(CONF_DIR "/use_xorg_monitor_settings")
+ #define CONF_KEY_TURN_ON_EXTERNAL_MONITORS_AT_STARTUP	(CONF_DIR "/turn_on_external_monitors_at_startup")
+ #define CONF_KEY_TURN_ON_LAPTOP_MONITOR_AT_STARTUP	(CONF_DIR "/turn_on_laptop_monitor_at_startup")
+ #define CONF_KEY_DEFAULT_CONFIGURATION_FILE             (CONF_DIR "/default_configuration_file")
+@@ -2350,7 +2351,8 @@ gsd_xrandr_manager_start (GsdXrandrManager *manager,
+         show_timestamps_dialog (manager, "Startup");
+         if (!apply_stored_configuration_at_startup (manager, GDK_CURRENT_TIME)) /* we don't have a real timestamp at startup anyway */
+                 if (!apply_default_configuration_from_file (manager, GDK_CURRENT_TIME))
+-                        apply_default_boot_configuration (manager, GDK_CURRENT_TIME);
++                        if (!gconf_client_get_bool (manager->priv->client, CONF_KEY_USE_XORG_MONITOR_SETTINGS, NULL))
++                                apply_default_boot_configuration (manager, GDK_CURRENT_TIME);
+ 
+         log_msg ("State of screen after initial configuration:\n");
+         log_screen (manager->priv->rw_screen);
+-- 
+1.7.3.2
+
diff --git a/0002-xrandr-Use-Xorg-monitor-settings-by-default.patch b/0002-xrandr-Use-Xorg-monitor-settings-by-default.patch
new file mode 100644
index 0000000..d88e499
--- /dev/null
+++ b/0002-xrandr-Use-Xorg-monitor-settings-by-default.patch
@@ -0,0 +1,26 @@
+From 72ce5287774464fad937d07aa316962b9ef05b47 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess at hadess.net>
+Date: Fri, 5 Nov 2010 16:01:35 +0000
+Subject: [PATCH 2/2] xrandr: Use Xorg monitor settings by default
+
+So as not to break the default behaviour.
+---
+ data/apps_gnome_settings_daemon_xrandr.schemas.in |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/data/apps_gnome_settings_daemon_xrandr.schemas.in b/data/apps_gnome_settings_daemon_xrandr.schemas.in
+index 082197e..cf458a6 100644
+--- a/data/apps_gnome_settings_daemon_xrandr.schemas.in
++++ b/data/apps_gnome_settings_daemon_xrandr.schemas.in
+@@ -19,7 +19,7 @@
+ 	    <applyto>/apps/gnome_settings_daemon/xrandr/use_xorg_monitor_settings</applyto>
+             <owner>gnome</owner>
+ 	    <type>bool</type>
+-            <default>false</default>
++            <default>true</default>
+             <locale name="C">
+ 	        <short>Do not touch monitor configuration</short>
+ 		<long>Usually, gnome-settings-daemon configures internal and
+-- 
+1.7.3.2
+
diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec
index a87debd..c522660 100644
--- a/gnome-settings-daemon.spec
+++ b/gnome-settings-daemon.spec
@@ -1,6 +1,6 @@
 Name:           gnome-settings-daemon
 Version:        2.32.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        The daemon sharing settings from GNOME to GTK+/KDE applications
 
 Group:          System Environment/Daemons
@@ -33,6 +33,10 @@ BuildRequires:  libcanberra-devel
 BuildRequires:  polkit-devel
 BuildRequires:  autoconf automake libtool
 
+# https://bugzilla.gnome.org/show_bug.cgi?id=631388
+Patch0: 0001-RANDR-Add-gconf-key-for-disabling-boot-time-configur.patch
+Patch1: 0002-xrandr-Use-Xorg-monitor-settings-by-default.patch
+
 # change font rendering
 Patch3: slight-hinting.patch
 
@@ -58,6 +62,8 @@ developing applications that use %{name}.
 
 %prep
 %setup -q
+%patch0 -p1 -b .can-use-xorg-config
+%patch1 -p1 -b .use-xorg-config
 %patch3 -p1 -b .slight-hinting
 %patch4 -p1 -b .keyboard-icon
 %patch5 -p1 -b .display-capplet
@@ -120,6 +126,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
 %{_libdir}/pkgconfig/gnome-settings-daemon.pc
 
 %changelog
+* Fri Nov 05 2010 Bastien Nocera <bnocera at redhat.com> 2.32.0-2
+- Use the X.org monitors configuration by default (#623824)
+
 * Thu Sep 30 2010 Matthias Clasen <mclasen at redhat.com> 2.32.0-1
 - Update to 2.32.0
 


More information about the scm-commits mailing list