[gnome-settings-daemon] Revert "power: Fix blanking not working"



commit 7f36e2dce2252d4eaf60add111d1b9e4d853ffc4
Author: Martin Pitt <martinpitt gnome org>
Date:   Tue Jan 22 07:47:54 2013 +0100

    Revert "power: Fix blanking not working"
    
    This reverts commit 16e98b1edb0d3bd72e28121dcbf7b713ea109b5e. This was
    accidentally pushed, but it is not ready yet.

 plugins/power/gsd-power-manager.c |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 90398d2..abf03f6 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2613,16 +2613,16 @@ idle_configure (GsdPowerManager *manager)
                 return;
         }
 
-        /* set up blank callback only when the screensaver is on,
-         * as it's what will drive the blank */
+        /* set up blank callback even when session is not idle,
+         * but only if we actually want to blank. */
         on_battery = up_client_get_on_battery (manager->priv->up_client);
-        timeout_blank = 0;
         if (manager->priv->screensaver_active) {
-                /* The tail is wagging the dog.
-                 * The screensaver coming on will blank the screen.
-                 * If an event occurs while the screensaver is on,
-                 * the aggressive idle watch will handle it */
                 timeout_blank = SCREENSAVER_TIMEOUT_BLANK;
+        } else {
+                timeout_blank = g_settings_get_uint (manager->priv->settings_session,
+                                                     "idle-delay");
+                if (timeout_blank != 0)
+                        timeout_blank += SCREENSAVER_FADE_TIME;
         }
 
         clear_idle_watch (manager->priv->idle_monitor,
@@ -2804,13 +2804,6 @@ screensaver_signal_cb (GDBusProxy *proxy,
                 if (manager->priv->screensaver_active != active) {
                         manager->priv->screensaver_active = active;
                         idle_configure (manager);
-
-                        /* Setup blank as soon as the screensaver comes on,
-                         * and its fade has finished.
-                         *
-                         * See also idle_configure() */
-                        if (active)
-                                idle_set_mode (manager, GSD_POWER_IDLE_MODE_BLANK);
                 }
         }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]