summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2020-10-22 14:09:08 +0200
committerBastien Nocera <hadess@hadess.net>2020-10-22 14:09:08 +0200
commitba153833fa25908ce6b1c084ff1fc1480cfd678c (patch)
treeb8214e340a78e9acaed14705f0601bd9bf3cba74
parent6ff9ee702e649f0c57d7b49b012f27f32f336290 (diff)
linux: Clarify UpInput device handling
Despite what the comments say, the device is indeed a valid input device, it's just not one we want to add to the power devices, as done in up-daemon.c's up_daemon_device_added_cb().
-rw-r--r--src/linux/up-backend.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/linux/up-backend.c b/src/linux/up-backend.c
index 9d08a85..2c46ab0 100644
--- a/src/linux/up-backend.c
+++ b/src/linux/up-backend.c
@@ -164,10 +164,9 @@ up_backend_device_new (UpBackend *backend, GUdevDevice *native)
/* we now have a lid */
up_daemon_set_lid_is_present (backend->priv->daemon, TRUE);
- /* not a power device */
+ /* not a power device, add it to the managed devices
+ * and don't return a power device */
up_device_list_insert (backend->priv->managed_devices, G_OBJECT (native), G_OBJECT (input));
-
- /* no valid input object */
device = NULL;
}
g_object_unref (input);