summaryrefslogtreecommitdiff
path: root/libupower-glib/up-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'libupower-glib/up-device.c')
-rw-r--r--libupower-glib/up-device.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libupower-glib/up-device.c b/libupower-glib/up-device.c
index 4015039..f90b862 100644
--- a/libupower-glib/up-device.c
+++ b/libupower-glib/up-device.c
@@ -103,6 +103,13 @@ G_DEFINE_TYPE (UpDevice, up_device, G_TYPE_OBJECT)
static void
up_device_changed_cb (UpExportedDevice *proxy, GParamSpec *pspec, UpDevice *device)
{
+ /* Proxy the notification from the D-Bus glue object
+ * to the real one, but only if the property exists
+ * for UpClient */
+ if (!g_object_class_find_property (G_OBJECT_GET_CLASS (device), pspec->name) &&
+ !g_str_equal (pspec->name, "type"))
+ return;
+
if (g_strcmp0 (pspec->name, "type") == 0)
g_object_notify (G_OBJECT (device), "kind");
else