[gnome-power-manager] Ignore suspend on lid closed if we are docked
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-power-manager] Ignore suspend on lid closed if we are docked
- Date: Fri, 7 Jan 2011 12:07:52 +0000 (UTC)
commit dde6e07b905cec0391eaaf770c58beeff86e4a9a
Author: Richard Hughes <richard hughsie com>
Date: Fri Jan 7 12:08:16 2011 +0000
Ignore suspend on lid closed if we are docked
src/gpm-manager.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index afa7305..87da12c 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -918,6 +918,14 @@ gpm_manager_lid_button_pressed (GpmManager *manager, gboolean pressed)
return;
}
+#if UP_CHECK_VERSION(0,9,8)
+ /* are we docked? */
+ if (up_client_get_is_docked (manager->priv->up_client)) {
+ g_debug ("ignoring lid closed action because we are docked");
+ return;
+ }
+#endif
+
if (!manager->priv->on_battery) {
g_debug ("Performing AC policy");
gpm_manager_perform_policy (manager, GSD_SETTINGS_BUTTON_LID_AC,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]