summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2023-09-24 21:41:15 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2023-09-24 23:46:49 +0200
commitbeb5670f68dee46f558dd195ab11d7e145b024a3 (patch)
tree34d256c2d57f691e0417f76d8022c08f4907f16d /kde-plasma/kscreen/files
parentkde-plasma/plasma-workspace: Fix calendar displaying default region (diff)
downloadgentoo-beb5670f68dee46f558dd195ab11d7e145b024a3.tar.gz
gentoo-beb5670f68dee46f558dd195ab11d7e145b024a3.tar.bz2
gentoo-beb5670f68dee46f558dd195ab11d7e145b024a3.zip
kde-plasma/kscreen: Only modify `Coordinate Transformation Matrix`
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=474110 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma/kscreen/files')
-rw-r--r--kde-plasma/kscreen/files/kscreen-5.27.8-libinput-calibration-matrix.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/kde-plasma/kscreen/files/kscreen-5.27.8-libinput-calibration-matrix.patch b/kde-plasma/kscreen/files/kscreen-5.27.8-libinput-calibration-matrix.patch
new file mode 100644
index 000000000000..f6e404ae1d52
--- /dev/null
+++ b/kde-plasma/kscreen/files/kscreen-5.27.8-libinput-calibration-matrix.patch
@@ -0,0 +1,60 @@
+From 49dbf9b9fb021d63ef5b712460483e6fe8c23a1c Mon Sep 17 00:00:00 2001
+From: theofficial gman <dofficialgman@gmail.com>
+Date: Sun, 24 Sep 2023 11:59:21 +0000
+Subject: [PATCH] Only modify `Coordinate Transformation Matrix`
+
+Allow `libinput Calibration Matrix` to exist as whatever it has set to by default.
+This allows for a UDEV rule to be made to set the calibration matrix in cases where
+the display and touchscreen do not have the same orientation or pixel sizing.
+This now matches the mutter implementation.
+
+BUG: 474110
+
+If my authorship is unsuitable (no real name used), I give permission for you to pick and reauthor at your wish.
+
+
+(cherry picked from commit c8f33c8fa3b194c883443457801119016cbbfe9f)
+---
+ kded/daemon.cpp | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/kded/daemon.cpp b/kded/daemon.cpp
+index f7cadee2..63ddf51a 100644
+--- a/kded/daemon.cpp
++++ b/kded/daemon.cpp
+@@ -483,7 +483,6 @@ void KScreenDaemon::alignX11TouchScreen()
+ if (matrixAtom == 0) {
+ return;
+ }
+- auto calibrationMatrixAtom = getAtom(connection, "libinput Calibration Matrix");
+ auto floatAtom = getAtom(connection, "FLOAT");
+ if (floatAtom == 0) {
+ return;
+@@ -532,23 +531,17 @@ void KScreenDaemon::alignX11TouchScreen()
+ std::unique_ptr<Atom, XDeleter> properties(XIListProperties(display, info->id, &nProperties));
+
+ bool matrixAtomFound = false;
+- bool libInputCalibrationAtomFound = false;
+
+ Atom *atom = properties.get();
+ Atom *atomEnd = properties.get() + nProperties;
+ for (; atom != atomEnd; atom++) {
+ if (!internalOutputRect.isEmpty() && *atom == matrixAtom) {
+ matrixAtomFound = true;
+- } else if (!internalOutputRect.isEmpty() && *atom == calibrationMatrixAtom) {
+- libInputCalibrationAtomFound = true;
+ }
+ }
+
+- if (libInputCalibrationAtomFound) {
+- setMatrixAtom(info, calibrationMatrixAtom, transform);
+- }
+ if (matrixAtomFound) {
+- setMatrixAtom(info, matrixAtom, libInputCalibrationAtomFound ? QTransform() : transform);
++ setMatrixAtom(info, matrixAtom, transform);
+ }
+
+ // For now we assume there is only one touchscreen
+--
+GitLab
+