summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Taylor <rob.taylor@codethink.co.uk>2007-09-23 18:42:08 +0100
committerRob Taylor <rob.taylor@codethink.co.uk>2007-09-23 18:42:08 +0100
commit44e720303af9454d74e50e69c962451fd97b07b1 (patch)
treee7658b5467402ec7061ab4ef4aa3a6b250206fe3
parente71617dab0bbd728cc4e8c736fecef934f108041 (diff)
display policy: handle return from powersave correctly
When coming back from powersave, set backlight.state=1.
-rw-r--r--plugins/policy/display/ohm-plugin-display.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/policy/display/ohm-plugin-display.c b/plugins/policy/display/ohm-plugin-display.c
index cfb032c..034474b 100644
--- a/plugins/policy/display/ohm-plugin-display.c
+++ b/plugins/policy/display/ohm-plugin-display.c
@@ -95,7 +95,7 @@ backlight_powersave (OhmPlugin *plugin, gboolean is_idle)
gint state;
ohm_plugin_conf_get_key (plugin, "backlight.state", &state);
- if (state == 0) {
+ if (is_idle && state == 0) {
/* work round a idletime bugs */
return;
}
@@ -109,6 +109,7 @@ backlight_powersave (OhmPlugin *plugin, gboolean is_idle)
/* if not idle any more */
if (is_idle == FALSE) {
+ ohm_plugin_conf_set_key (plugin, "backlight.state", 1);
reset_brightness (plugin);
return;
}