From ebbea9e132e97f6aef390755a5b7f018c55fadff Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Thu, 5 Mar 2020 22:06:16 +0100 Subject: [PATCH] Fix xinput rotation. Left/Right was swapped for the coordinate matrix as well. --- src/main.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9a51a78..95d166f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -239,13 +239,13 @@ fn main() -> Result<(), String> { vector: (-1.0, 0.0), new_state: "90", x_state: "right", - matrix: ["0", "-1", "1", "1", "0", "0", "0", "0", "1"], + matrix: ["0", "1", "0", "-1", "0", "1", "0", "0", "1"], }, Orientation { vector: (1.0, 0.0), new_state: "270", x_state: "left", - matrix: ["0", "1", "0", "-1", "0", "1", "0", "0", "1"], + matrix: ["0", "-1", "1", "1", "0", "0", "0", "0", "1"], }, ]; @@ -317,9 +317,7 @@ fn main() -> Result<(), String> { Command::new("xinput") .arg("set-prop") .arg(touchscreen) - .arg("Coordinate") - .arg("Transformation") - .arg("Matrix") + .arg("Coordinate Transformation Matrix") .args(&matrix) .spawn() .expect("Xinput rotate command failed to start")