[gnome-power-manager] Don't rely on the cached value of the lid status, to properly fix the double suspend issue
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-power-manager] Don't rely on the cached value of the lid status, to properly fix the double suspend issue
- Date: Sat, 23 Jan 2010 14:52:20 +0000 (UTC)
commit b10f242af345f01415d26e35edb147dd7177453b
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]