Add tablet option map-to-focused-output

This commit is contained in:
Benjamin Bäumler
2026-01-23 18:28:03 +01:00
committed by Ivan Molodetskikh
parent f4ebbc8017
commit 9e5716a9db
4 changed files with 15 additions and 2 deletions
+6 -2
View File
@@ -3582,8 +3582,12 @@ impl Niri {
pub fn output_for_tablet(&self) -> Option<&Output> {
let config = self.config.borrow();
let map_to_output = config.input.tablet.map_to_output.as_ref();
map_to_output.and_then(|name| self.output_by_name_match(name))
if config.input.tablet.map_to_focused_output {
self.layout.active_output()
} else {
let map_to_output = config.input.tablet.map_to_output.as_ref();
map_to_output.and_then(|name| self.output_by_name_match(name))
}
}
pub fn output_for_touch(&self) -> Option<&Output> {