summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-07-22 13:49:40 +0200
committerBastien Nocera <hadess@hadess.net>2021-08-10 10:47:37 +0000
commit781e856974a4f37204c6f971ed232b124c2ff70e (patch)
tree0b7be55fc4ce778ace50639b807684d905cea937
parent3b91711e82a932be12df4661a50b646e729164df (diff)
downloadupower-781e856974a4f37204c6f971ed232b124c2ff70e.tar.gz
linux: Fix touchpad not being the right type
Touchpads are also tagged as mice, so make sure that we check for the touchpad property before checking for mouse one.
-rw-r--r--src/linux/up-device-supply.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c
index 300c74d..cd5592c 100644
--- a/src/linux/up-device-supply.c
+++ b/src/linux/up-device-supply.c
@@ -1063,10 +1063,10 @@ up_device_supply_guess_type (GUdevDevice *native,
sibling = up_device_supply_get_sibling_with_subsystem (native, "input");
if (sibling) {
- if (g_udev_device_get_property_as_boolean (sibling, "ID_INPUT_MOUSE")) {
- type = UP_DEVICE_KIND_MOUSE;
- } else if (g_udev_device_get_property_as_boolean (sibling, "ID_INPUT_TOUCHPAD")) {
+ if (g_udev_device_get_property_as_boolean (sibling, "ID_INPUT_TOUCHPAD")) {
type = UP_DEVICE_KIND_TOUCHPAD;
+ } else if (g_udev_device_get_property_as_boolean (sibling, "ID_INPUT_MOUSE")) {
+ type = UP_DEVICE_KIND_MOUSE;
} else if (g_udev_device_get_property_as_boolean (sibling, "ID_INPUT_JOYSTICK")) {
type = UP_DEVICE_KIND_GAMING_INPUT;
} else {