[gnome-power-manager/gnome-2-28] Don't rely on the cached value of the lid status, to properly fix the double suspend issue



commit 2b430323a00e606540a6b82ad09ef724f0d09276
Author: Chow Loong Jin <hyperair ubuntu com>
Date:   Sat Jan 23 14:51:46 2010 +0000

    Don't rely on the cached value of the lid status, to properly fix the double suspend issue
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 src/gpm-button.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/gpm-button.c b/src/gpm-button.c
index 88ae542..34f366f 100644
--- a/src/gpm-button.c
+++ b/src/gpm-button.c
@@ -255,8 +255,14 @@ gpm_button_class_init (GpmButtonClass *klass)
 gboolean
 gpm_button_is_lid_closed (GpmButton *button)
 {
+	gboolean lid_is_closed;
+
 	g_return_val_if_fail (GPM_IS_BUTTON (button), FALSE);
-	return button->priv->lid_is_closed;
+
+	g_object_get (button->priv->client,
+		      "lid-is-closed", &lid_is_closed,
+		      NULL);
+	return lid_is_closed;
 }
 
 /**



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