[gnome-settings-daemon/gnome-3-12] power: Fix display not blanking after gnome-shell wake up



commit 79efa3bab3967ddab4a045d01da15e043573ae0f
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 847e382..91ecedf 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -1638,9 +1638,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]