diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/input/mod.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/input/mod.rs b/src/input/mod.rs index ddd24c4a..163c7748 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -4564,6 +4564,20 @@ pub fn apply_libinput_settings(config: &niri_config::Input, device: &mut input:: } else { input::SendEventsMode::ENABLED }); + + #[rustfmt::skip] + const IDENTITY_MATRIX: [f32; 6] = [ + 1., 0., 0., + 0., 1., 0., + ]; + + let _ = device.config_calibration_set_matrix( + c.calibration_matrix + .as_deref() + .and_then(|m| m.try_into().ok()) + .or(device.config_calibration_default_matrix()) + .unwrap_or(IDENTITY_MATRIX), + ); } } |
