[gnome-settings-daemon] power: Don't unidle if the lid is closed
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Don't unidle if the lid is closed
- Date: Thu, 31 Jan 2013 19:42:38 +0000 (UTC)
commit 186fa02dc8e1c1c47a93f064313f17be7fafaf52
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jan 31 20:31:15 2013 +0100
power: Don't unidle if the lid is closed
No need to wake up a closed display, nothing to see.
plugins/power/gsd-power-manager.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 935d701..7e75ee4 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2295,8 +2295,7 @@ up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
manager->priv->lid_is_closed = tmp;
g_debug ("up changed: lid is now %s", tmp ? "closed" : "open");
- /* fake a keypress */
- if (tmp)
+ if (manager->priv->lid_is_closed)
do_lid_closed_action (manager);
else
do_lid_open_action (manager);
@@ -2802,6 +2801,9 @@ up_client_on_battery_cb (UpClient *client,
{
idle_configure (manager);
+ if (manager->priv->lid_is_closed)
+ return;
+
if (manager->priv->current_idle_mode == GSD_POWER_IDLE_MODE_BLANK ||
manager->priv->current_idle_mode == GSD_POWER_IDLE_MODE_DIM ||
manager->priv->temporary_unidle_on_ac_id != 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]