[gnome-settings-daemon] power: Don't setup idle watches when we're not active
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Don't setup idle watches when we're not active
- Date: Fri, 25 Jan 2013 13:46:03 +0000 (UTC)
commit a6178e0f931fe7fcdd6e382916d7bbca628270df
Author: Bastien Nocera <hadess hadess net>
Date: Fri Jan 25 13:10:10 2013 +0100
power: Don't setup idle watches when we're not active
This stops use from receiving idle triggered signals when we
don't actually want to act upon them.
plugins/power/gsd-power-manager.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 24463a6..c5aaba0 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2658,8 +2658,8 @@ idle_configure (GsdPowerManager *manager)
}
/* are we inhibited from going idle */
- if (is_idle_inhibited) {
- g_debug ("inhibited, so using normal state");
+ if (!is_session_active (manager) || is_idle_inhibited) {
+ g_debug ("inhibited or inactive, so using normal state");
idle_set_mode (manager, GSD_POWER_IDLE_MODE_NORMAL);
clear_idle_watch (manager->priv->idle_monitor,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]