mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
input: add basic touch support
This commit is contained in:
committed by
Ivan Molodetskikh
parent
5ac350d51c
commit
719697179f
@@ -62,6 +62,8 @@ pub struct Input {
|
||||
pub trackpoint: Trackpoint,
|
||||
#[knuffel(child, default)]
|
||||
pub tablet: Tablet,
|
||||
#[knuffel(child, default)]
|
||||
pub touch: Touch,
|
||||
#[knuffel(child)]
|
||||
pub disable_power_key_handling: bool,
|
||||
}
|
||||
@@ -201,6 +203,12 @@ pub struct Tablet {
|
||||
pub map_to_output: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(knuffel::Decode, Debug, Default, PartialEq)]
|
||||
pub struct Touch {
|
||||
#[knuffel(child, unwrap(argument))]
|
||||
pub map_to_output: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(knuffel::Decode, Debug, Clone, PartialEq)]
|
||||
pub struct Output {
|
||||
#[knuffel(child)]
|
||||
@@ -1092,6 +1100,10 @@ mod tests {
|
||||
map-to-output "eDP-1"
|
||||
}
|
||||
|
||||
touch {
|
||||
map-to-output "eDP-1"
|
||||
}
|
||||
|
||||
disable-power-key-handling
|
||||
}
|
||||
|
||||
@@ -1223,6 +1235,9 @@ mod tests {
|
||||
tablet: Tablet {
|
||||
map_to_output: Some("eDP-1".to_owned()),
|
||||
},
|
||||
touch: Touch {
|
||||
map_to_output: Some("eDP-1".to_owned()),
|
||||
},
|
||||
disable_power_key_handling: true,
|
||||
},
|
||||
outputs: vec![Output {
|
||||
|
||||
Reference in New Issue
Block a user