summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2018-01-03 19:55:46 +0100
committerBenjamin Berg <bberg@redhat.com>2018-01-15 17:23:38 +0100
commit75b331eb8bfc94d66148aae474ed35ceff0df31f (patch)
tree363fa0ff88ee5f344210aede1933779c8e1200b2 /plugins
parentdee9a77f889c8f539bdfab77d9982e9358b8016d (diff)
downloadgnome-settings-daemon-75b331eb8bfc94d66148aae474ed35ceff0df31f.tar.gz
power: Keep screen off while screensaver is on when adding inhibitors
When a new idle inhibitor is added then the state needs to be forced to normal mode even when the user is idle. However, this should not happen if the screensaver is active at the time. https://bugzilla.gnome.org/show_bug.cgi?id=792209
Diffstat (limited to 'plugins')
-rw-r--r--plugins/power/gsd-power-manager.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 19fa3214..11a7aa84 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -1733,9 +1733,10 @@ idle_configure (GsdPowerManager *manager)
}
/* are we inhibited from going idle */
- if (!manager->priv->session_is_active || is_idle_inhibited) {
- if (is_idle_inhibited)
- g_debug ("inhibited, so using normal state");
+ if (!manager->priv->session_is_active ||
+ (is_idle_inhibited && !manager->priv->screensaver_active)) {
+ if (is_idle_inhibited && !manager->priv->screensaver_active)
+ g_debug ("inhibited and screensaver not active, so using normal state");
else
g_debug ("inactive, so using normal state");
idle_set_mode (manager, GSD_POWER_IDLE_MODE_NORMAL);