diff options
-rw-r--r-- | input/device.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/input/device.c b/input/device.c index af118bfa..6564b90d 100644 --- a/input/device.c +++ b/input/device.c @@ -985,6 +985,13 @@ static void device_unregister(void *data) input_device_free(idev); } +static gint connected_cmp(gpointer a, gpointer b) +{ + struct input_conn *iconn = a; + + return !is_connected(iconn); +} + static DBusMessage *device_get_properties(DBusConnection *conn, DBusMessage *msg, void *data) { @@ -1007,7 +1014,7 @@ static DBusMessage *device_get_properties(DBusConnection *conn, /* Connected */ connected = !!g_slist_find_custom(idev->connections, NULL, - (GCompareFunc) is_connected); + (GCompareFunc) connected_cmp); dict_append_entry(&dict, "Connected", DBUS_TYPE_BOOLEAN, &connected); dbus_message_iter_close_container(&iter, &dict); |