GNOME Bugzilla – Bug 764896
Don't claim the light sensor if we're not active
Last modified: 2016-04-13 12:25:06 UTC
.
Created attachment 325728 [details] [review] power: Don't claim the light sensor if we're not active Try not to claim the light sensor when our seat isn't active, as this will just throw PolicyKit errors about not being authorised, as happens with gdm trying to change the backlight when we're logged in.
Created attachment 325729 [details] [review] power: Fix typo in warning message
Review of attachment 325728 [details] [review]: We should probably ensure that we read the active property on startup
Comment on attachment 325729 [details] [review] power: Fix typo in warning message Attachment 325729 [details] pushed as a9621e6 - power: Fix typo in warning message
Created attachment 325854 [details] [review] power: Don't claim the light sensor if we're not active Try not to claim the light sensor when our seat isn't active, as this will just throw PolicyKit errors about not being authorised, as happens with gdm trying to change the backlight when we're logged in.
Review of attachment 325854 [details] [review]: ::: plugins/power/gsd-power-manager.c @@ +142,3 @@ gboolean lid_is_present; gboolean lid_is_closed; + gboolean session_is_active; It seems like we already have an is_session_active() in this file which checks the dbus proxy directly. I think just re-using that should be good enough instead of keeping track of the variable again here. Or we could replace that function and its callers to just use this variable since you're updating it here when the dbus property changes.
Created attachment 325857 [details] [review] power: Don't claim the light sensor if we're not active Try not to claim the light sensor when our seat isn't active, as this will just throw PolicyKit errors about not being authorised, as happens with gdm trying to change the backlight when we're logged in. Also remove the calls to is_session_active() and use the cached variable when possible.
Review of attachment 325857 [details] [review]: looks good otherwise ::: plugins/power/gsd-power-manager.c @@ +1668,2 @@ /* are we inhibited from going idle */ + if (manager->priv->session_is_active || is_idle_inhibited) { this should be !m->p->session_is_active
Created attachment 325858 [details] [review] power: Don't claim the light sensor if we're not active Try not to claim the light sensor when our seat isn't active, as this will just throw PolicyKit errors about not being authorised, as happens with gdm trying to change the backlight when we're logged in. Also remove the calls to is_session_active() and use the cached variable when possible.
Attachment 325858 [details] pushed as 76dab07 - power: Don't claim the light sensor if we're not active