tty: Load libinput plugins if available

Some distros like Fedora build libinput with plugin autoloading, however
by default, the compositor needs to explicitly load them. Plus, we need
to load manually if we want to also load from
$XDG_CONFIG_HOME/libinput/plugins.

Ref. https://gitlab.gnome.org/GNOME/mutter/-/commit/c5b12fbf6313d51f3279901bb561023e56181e36
This commit is contained in:
Ivan Molodetskikh
2025-12-29 16:14:52 +03:00
parent b5640d5293
commit 1ab1737653
4 changed files with 59 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
fn main() {
println!("cargo:rustc-check-cfg=cfg(have_libinput_plugin_system)");
if pkg_config::Config::new()
.atleast_version("1.30.0")
.probe("libinput")
.is_ok()
{
println!("cargo:rustc-cfg=have_libinput_plugin_system")
}
}