mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 17:31:28 +00:00
Improve built-in touchscreen detection
Adds detection code to handle pci-*-platform-* strings in ID_PATH References: https://github.com/swaywm/sway/issues/6590 Signed-off-by: Jari Ronkainen <ronchaine@gmail.com>
This commit is contained in:
parent
83310f5abf
commit
624ffa4516
|
@ -332,6 +332,13 @@ bool sway_libinput_device_is_builtin(struct sway_input_device *sway_device) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char prefix[] = "platform-";
|
const char prefix_platform[] = "platform-";
|
||||||
return strncmp(id_path, prefix, strlen(prefix)) == 0;
|
if (strncmp(id_path, prefix_platform, strlen(prefix_platform)) != 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char prefix_pci[] = "pci-";
|
||||||
|
const char infix_platform[] = "-platform-";
|
||||||
|
return (strncmp(id_path, prefix_pci, strlen(prefix_pci)) == 0) &&
|
||||||
|
strstr(id_path, infix_platform);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue