Skip to content

Commit

Permalink
Ignore devices that don't have ID_INPUT_MOUSE set
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  • Loading branch information
whot committed May 5, 2016
1 parent 1da0180 commit 91eefb9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libratbag.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,9 @@ ratbag_device_new_from_udev_device(struct ratbag *ratbag,
assert(udev_device != NULL);
assert(device_out != NULL);

if (udev_prop_value(udev_device, "ID_INPUT_MOUSE") == NULL)
goto out_err;

if (get_product_id(udev_device, &id) != 0)
goto out_err;

Expand Down

0 comments on commit 91eefb9

Please sign in to comment.