summaryrefslogtreecommitdiff
path: root/extra/gnome-power-manager/fix-suspend.patch
blob: acd9093cd94978b16c211eeaa14df2e7853e647b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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