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



commit 29da57cde948866052d0729adb58dd17eb6c28b8
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 e55ad3c..ceff16d 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -989,7 +989,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]