summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-11-21 14:20:37 +0000
committerRichard Hughes <richard@hughsie.com>2012-11-21 14:20:43 +0000
commita95d9cdf0d1e69c171a17af7fbb8f75869cd54b9 (patch)
tree01c616c62c473f6ada1470abb6f84bf1c86b84b6 /data
parenta15f3d83b0ffa7b05b7f3e571b60eab9785000e0 (diff)
downloadgnome-settings-daemon-a95d9cdf0d1e69c171a17af7fbb8f75869cd54b9.tar.gz
gsd-xrandr: Add new follow-lid behavior and tie gsd-power lid-close to gsd-xrandr
There are two problems in the implementation of "turn off laptop screen when lid closed", First, it is not enabled at startup. Second, it conflicts with the gsd-power option to never use external monitors with the lid closed. To fix this, unify the gsd-xrandr default-monitors-setup setting with the aforementioned gsd-power option. The default-monitors-option now has four settings. The new follow-lid mode is the default and matches earlier behavior, plus it also checks the laptop lid state at startup. The follow-lid and clone mode still turn off the laptop screen when the lid is closed, the dock and do-nothing mode leave it apart. With this in place, gsd-power does not need anymore the special option for lid-close-suspend-with-external-monitor. It can just look at the default-monitors-setup setting, and only suspend if that setting is "do-nothing". All other settings imply that you want to keep working on the external monitor.
Diffstat (limited to 'data')
-rw-r--r--data/gsd-enums.h3
-rw-r--r--data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in11
-rw-r--r--data/org.gnome.settings-daemon.plugins.xrandr.gschema.xml.in.in4
3 files changed, 4 insertions, 14 deletions
diff --git a/data/gsd-enums.h b/data/gsd-enums.h
index 99d9fbad..8b8f2f5e 100644
--- a/data/gsd-enums.h
+++ b/data/gsd-enums.h
@@ -79,7 +79,8 @@ typedef enum
{
GSD_XRANDR_BOOT_BEHAVIOUR_DO_NOTHING,
GSD_XRANDR_BOOT_BEHAVIOUR_CLONE,
- GSD_XRANDR_BOOT_BEHAVIOUR_DOCK
+ GSD_XRANDR_BOOT_BEHAVIOUR_DOCK,
+ GSD_XRANDR_BOOT_BEHAVIOUR_FOLLOW_LID
} GsdXrandrBootBehaviour;
typedef enum
diff --git a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
index 3d1495a5..d10f6c14 100644
--- a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
+++ b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
@@ -81,17 +81,6 @@
<summary>Power button action</summary>
<description>The action to take when the system power button is pressed.</description>
</key>
- <key name="lid-close-suspend-with-external-monitor" type="b">
- <default>false</default>
- <summary>Laptop lid, when closed, will suspend even if there is an external monitor plugged in</summary>
- <description>With no external monitors plugged in, closing a laptop's lid
- will suspend the machine (as set by the lid-close-battery-action and
- lid-close-ac-action keys). By default, however, closing the lid when
- an external monitor is present will not suspend the machine, so that one can keep
- working on that monitor (e.g. for docking stations or media viewers). Set this
- key to False to keep the default behavior, or to True to suspend the laptop whenever the
- lid is closed and regardless of external monitors.</description>
- </key>
<key name="critical-battery-action" enum="org.gnome.settings-daemon.GsdPowerActionType">
<default>'hibernate'</default>
<summary>Battery critical low action</summary>
diff --git a/data/org.gnome.settings-daemon.plugins.xrandr.gschema.xml.in.in b/data/org.gnome.settings-daemon.plugins.xrandr.gschema.xml.in.in
index 51f87bbf..f3c2dc37 100644
--- a/data/org.gnome.settings-daemon.plugins.xrandr.gschema.xml.in.in
+++ b/data/org.gnome.settings-daemon.plugins.xrandr.gschema.xml.in.in
@@ -16,9 +16,9 @@
<_description>Priority to use for this plugin in gnome-settings-daemon startup queue</_description>
</key>
<key name="default-monitors-setup" enum="org.gnome.settings-daemon.GsdXrandrBootBehaviour">
- <default>'do-nothing'</default>
+ <default>'follow-lid'</default>
<_summary>Whether to turn off specific monitors after boot</_summary>
- <_description>'clone' will display the same thing on all monitors, 'dock' will switch off the internal monitor, 'do-nothing' will use the default Xorg behaviour (extend the desktop in recent versions)</_description>
+ <_description>'clone' will display the same thing on all monitors, 'dock' will switch off the internal monitor, 'do-nothing' will use the default Xorg behaviour (extend the desktop in recent versions). The default, 'follow-lid', will choose between 'do-nothing' and 'dock' depending on whether the lid is (respectively) open or closed.</_description>
</key>
</schema>
</schemalist>