[gnome-settings-daemon] power: Fix display not blanking after gnome-shell wake up
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Fix display not blanking after gnome-shell wake up
- Date: Thu, 24 Apr 2014 20:05:01 +0000 (UTC)
commit 905c538dcd1b3ed232413580fb425217544f562a
Author: Bastien Nocera <hadess hadess net>
Date: Thu Apr 24 22:03:23 2014 +0200
power: Fix display not blanking after gnome-shell wake up
- Let the machine's screen blank, or Win+L to lock it
- Screen turns off (mode "blank")
- Time passes, the sleep timeout kicks off
- We do nothing, as the action is "nothing" for sleep by default
- Notification comes in
- Screen wakes up (mode "normal") with a 15 seconds timeout
- 15 seconds timeout kicks off, we go back to the previous mode (mode "sleep")
- But mode "sleep" doesn't blank the screen, and does nothing, screen stays on
We'll fix this by never triggering the "sleep" idle mode when there's
nothing to do.
plugins/power/gsd-power-manager.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 980d4cd..5ce8451 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -1633,9 +1633,12 @@ idle_configure (GsdPowerManager *manager)
if (timeout_sleep != 0) {
g_debug ("setting up sleep callback %is", timeout_sleep);
- manager->priv->idle_sleep_id = gnome_idle_monitor_add_idle_watch
(manager->priv->idle_monitor,
- timeout_sleep * 1000,
- idle_triggered_idle_cb,
manager, NULL);
+ if (action_type != GSD_POWER_ACTION_NOTHING) {
+ manager->priv->idle_sleep_id = gnome_idle_monitor_add_idle_watch
(manager->priv->idle_monitor,
+ timeout_sleep *
1000,
+
idle_triggered_idle_cb, manager, NULL);
+ }
+
if (action_type == GSD_POWER_ACTION_LOGOUT ||
action_type == GSD_POWER_ACTION_SUSPEND ||
action_type == GSD_POWER_ACTION_HIBERNATE) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]