~ubuntu-desktop/gnome-settings-daemon/ubuntu

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 59d0751fd18a8e75cb15ad80df85975e71324016 Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Sun, 14 Jul 2013 10:30:08 +1000
Subject: [PATCH] Revert "Remove unused settings" and add a 'handle-lid-switch'
  inhibitor based on lid-close-*-action settings.

This reverts commit 58cb4eee64bbd8ca43111b1f80fdaacde8ad5f12.
---
 data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in |   22 ++++++
 plugins/power/gsd-power-manager.c                              |   34 ++++++++++
 2 files changed, 56 insertions(+)

--- a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
+++ b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
@@ -30,6 +30,28 @@
       <_summary>Whether to hibernate, suspend or do nothing when inactive</_summary>
       <_description>The type of sleeping that should be performed when the computer is inactive.</_description>
     </key>
+    <!-- See http://bugzilla.gnome.org/637473 for rationale -->
+    <key name="lid-close-battery-action" enum="org.gnome.settings-daemon.GsdPowerActionType">
+      <default>'suspend'</default>
+      <_summary>Laptop lid close action on battery</_summary>
+      <_description>The action to take when the laptop lid is closed and the laptop is on battery power.</_description>
+    </key>
+    <key name="lid-close-ac-action" enum="org.gnome.settings-daemon.GsdPowerActionType">
+      <default>'suspend'</default>
+      <_summary>Laptop lid close action when on AC</_summary>
+      <_description>The action to take when the laptop lid is closed and the laptop is on AC power.</_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="ambient-enabled" type="b">
       <default>true</default>
       <_summary>Enable the ALS sensor</_summary>