[gnome-power-manager] Handle return to NORMAL idle when lid closed a bit better



commit 54fcef266752ee2141079c89b1a1de9a4c8319c7
Author: Richard Hughes <richard hughsie com>
Date:   Tue May 26 11:11:33 2009 +0100

    Handle return to NORMAL idle when lid closed a bit better
---
 src/gpm-manager.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index 384cc14..5b45340 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -608,13 +608,12 @@ idle_changed_cb (GpmIdle *idle, GpmIdleMode mode, GpmManager *manager)
 		return;
 	}
 
-	/* Ignore timeout events when the lid is closed, as the DPMS is
-	 * already off, and we don't want to perform policy actions or re-enable
-	 * the screen when the user moves the mouse on systems that do not
-	 * support hardware blanking.
-	 * Details are here: https://launchpad.net/malone/bugs/22522 */
-	if (gpm_button_is_lid_closed (manager->priv->button)) {
-		egg_debug ("lid is closed, so we are ignoring idle state changes");
+	/* Ignore back-to-NORMAL events when the lid is closed, as the DPMS is
+	 * already off, and we don't want to re-enable the screen when the user
+	 * moves the mouse on systems that do not support hardware blanking. */
+	if (gpm_button_is_lid_closed (manager->priv->button) &&
+	    mode == GPM_IDLE_MODE_NORMAL) {
+		egg_debug ("lid is closed, so we are ignoring ->NORMAL state changes");
 		return;
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]