diff options
Diffstat (limited to 'src/input')
| -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 8d9e6d82..a2931b85 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -3451,6 +3451,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), + ); let _ = device.config_left_handed_set(c.left_handed); } } |
