[gnome-settings-daemon] power: Ensure the panel is explicitly turned off if the lid has been closed
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Ensure the panel is explicitly turned off if the lid has been closed
- Date: Wed, 13 Jul 2011 10:43:26 +0000 (UTC)
commit 116903e8d29506addf548a2ab153cabfee501ece
Author: Richard Hughes <richard hughsie com>
Date: Tue Jul 5 09:45:29 2011 +0100
power: Ensure the panel is explicitly turned off if the lid has been closed
Some laptops do not cut the power to the backlight in the hardware on lid close,
and not doing this action manually can lead to toasty panels.
plugins/power/gsd-power-manager.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 4416d72..b4ab3c2 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -1873,6 +1873,8 @@ do_lid_open_action (GsdPowerManager *manager)
static void
do_lid_closed_action (GsdPowerManager *manager)
{
+ gboolean ret;
+ GError *error = NULL;
GsdPowerActionType action_type;
/* play a sound, using sounds from the naming spec */
@@ -1907,6 +1909,16 @@ do_lid_closed_action (GsdPowerManager *manager)
return;
}
+ /* ensure we turn the panel back on after resume */
+ ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
+ GNOME_RR_DPMS_OFF,
+ &error);
+ if (!ret) {
+ g_warning ("failed to turn the panel off after lid close: %s",
+ error->message);
+ g_error_free (error);
+ }
+
/* perform policy action */
do_power_action_type (manager, action_type);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]