Skip to content

Commit 9276cf9

Browse files
committed
Fallback to search for any trackpad device
Refer issue #230. Not sure if this commit helps for that issue but may as well use a device with trackpad in it's name if we did not find any other better device candidate.
1 parent 02c7ab7 commit 9276cf9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libinput-gestures

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,14 @@ def get_device_info(name, cmd_list_devices, device_list):
124124
for d in devices:
125125
if 'size' in d and 'pointer' in d.get('capabilities'):
126126
return d
127-
# Otherwise look for 1st device with touchpad in it's name
127+
# Otherwise look for 1st device with touchpad in it's name
128128
for d in devices:
129129
if re.search(r'touch ?pad', d.get('device', ''), re.I):
130130
return d
131+
# Otherwise look for 1st device with trackpad in it's name
132+
for d in devices:
133+
if re.search(r'track ?pad', d.get('device', ''), re.I):
134+
return d
131135

132136
# Give up
133137
return None

0 commit comments

Comments
 (0)