[gnome-settings-daemon/gnome-3-24] power: Allow disabling ALS monitoring even if inactive



commit a65043169e1f12668bb6904223c4facf03493f7b
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Aug 11 17:08:42 2017 +0200

    power: Allow disabling ALS monitoring even if inactive
    
    We definitely do want to be able to disable light sensor
    monitoring even if we're not in an active session any more.
    
    The only case this conditional was supposed to prevent is
    trying to claim the light sensor when the session is inactive.
    Anything else should be allowed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766067

 plugins/power/gsd-power-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index ab9e3dc..f13a2c9 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -992,7 +992,7 @@ iio_proxy_claim_light (GsdPowerManager *manager, gboolean active)
                 return;
         if (!manager->priv->backlight_available)
                 return;
-       if (active != manager->priv->session_is_active)
+       if (active && !manager->priv->session_is_active) {
                return;
 
         if (!g_dbus_proxy_call_sync (manager->priv->iio_proxy,


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