diff options
-rw-r--r-- | sway/input/libinput.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sway/input/libinput.c b/sway/input/libinput.c index 060a584a..3c0f359d 100644 --- a/sway/input/libinput.c +++ b/sway/input/libinput.c | |||
@@ -332,6 +332,13 @@ bool sway_libinput_device_is_builtin(struct sway_input_device *sway_device) { | |||
332 | return false; | 332 | return false; |
333 | } | 333 | } |
334 | 334 | ||
335 | const char prefix[] = "platform-"; | 335 | const char prefix_platform[] = "platform-"; |
336 | return strncmp(id_path, prefix, strlen(prefix)) == 0; | 336 | if (strncmp(id_path, prefix_platform, strlen(prefix_platform)) != 0) { |
337 | return false; | ||
338 | } | ||
339 | |||
340 | const char prefix_pci[] = "pci-"; | ||
341 | const char infix_platform[] = "-platform-"; | ||
342 | return (strncmp(id_path, prefix_pci, strlen(prefix_pci)) == 0) && | ||
343 | strstr(id_path, infix_platform); | ||
337 | } | 344 | } |