summaryrefslogtreecommitdiff
path: root/extra/gnome-power-manager/fix-suspend.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/gnome-power-manager/fix-suspend.patch')
-rw-r--r--extra/gnome-power-manager/fix-suspend.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/extra/gnome-power-manager/fix-suspend.patch b/extra/gnome-power-manager/fix-suspend.patch
new file mode 100644
index 000000000..acd9093cd
--- /dev/null
+++ b/extra/gnome-power-manager/fix-suspend.patch
@@ -0,0 +1,31 @@
+From 44503c5bca065290ce73b0d064a1a0db7de2936d Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Mon, 02 May 2011 23:18:58 +0000
+Subject: gpm-idle: manually update the status property
+
+gnome-session doesn't emit PropertyChanged since it uses dbus-glib,
+therefore we need to manually update the cached property when
+receiving a SessionChanged signal.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=679083
+
+Signed-off-by: Richard Hughes <richard@hughsie.com>
+---
+diff --git a/src/gpm-idle.c b/src/gpm-idle.c
+index 04225fc..0f2f1ee 100644
+--- a/src/gpm-idle.c
++++ b/src/gpm-idle.c
+@@ -424,6 +424,11 @@ gpm_idle_dbus_signal_cb (GDBusProxy *proxy, const gchar *sender_name, const gcha
+ return;
+ }
+ if (g_strcmp0 (signal_name, "StatusChanged") == 0) {
++ guint status;
++
++ g_variant_get (parameters, "(u)", &status);
++ g_dbus_proxy_set_cached_property (proxy, "status",
++ g_variant_new ("u", status));
+ g_debug ("Received gnome session status change");
+ gpm_idle_evaluate (idle);
+ return;
+--
+cgit v0.9