diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2023-09-24 21:41:15 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2023-09-24 23:46:49 +0200 |
commit | beb5670f68dee46f558dd195ab11d7e145b024a3 (patch) | |
tree | 34d256c2d57f691e0417f76d8022c08f4907f16d /kde-plasma/kscreen | |
parent | kde-plasma/plasma-workspace: Fix calendar displaying default region (diff) | |
download | gentoo-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')
-rw-r--r-- | kde-plasma/kscreen/files/kscreen-5.27.8-libinput-calibration-matrix.patch | 60 | ||||
-rw-r--r-- | kde-plasma/kscreen/kscreen-5.27.8-r2.ebuild | 55 |
2 files changed, 115 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 + diff --git a/kde-plasma/kscreen/kscreen-5.27.8-r2.ebuild b/kde-plasma/kscreen/kscreen-5.27.8-r2.ebuild new file mode 100644 index 000000000000..4016d62b3484 --- /dev/null +++ b/kde-plasma/kscreen/kscreen-5.27.8-r2.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_TEST="forceoptional" +KFMIN=5.106.0 +PVCUT=$(ver_cut 1-3) +QTMIN=5.15.9 +inherit ecm plasma.kde.org + +DESCRIPTION="KDE Plasma screen management" +HOMEPAGE="https://invent.kde.org/plasma/kscreen" + +LICENSE="GPL-2" # TODO: CHECK +SLOT="5" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="" + +# bug #580440, last checked 5.6.3 +RESTRICT="test" + +DEPEND=" + >=dev-qt/qtdbus-${QTMIN}:5 + >=dev-qt/qtdeclarative-${QTMIN}:5[widgets] + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtsensors-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=dev-qt/qtx11extras-${QTMIN}:5 + >=kde-frameworks/kcmutils-${KFMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/kdeclarative-${KFMIN}:5 + >=kde-frameworks/kdbusaddons-${KFMIN}:5 + >=kde-frameworks/kglobalaccel-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kwindowsystem-${KFMIN}:5 + >=kde-frameworks/kxmlgui-${KFMIN}:5 + >=kde-frameworks/plasma-${KFMIN}:5 + >=kde-plasma/layer-shell-qt-${PVCUT}:5 + >=kde-plasma/libkscreen-${PVCUT}:5= + x11-libs/libX11 + x11-libs/libxcb:= + x11-libs/libXi +" +RDEPEND="${DEPEND} + >=dev-qt/qtgraphicaleffects-${QTMIN}:5 + >=kde-plasma/kde-cli-tools-${PVCUT}:5 +" +BDEPEND=">=kde-frameworks/kcmutils-${KFMIN}:5" + +PATCHES=( + "${FILESDIR}/${P}-cmake.patch" # bug 914142 + "${FILESDIR}/${P}-libinput-calibration-matrix.patch" # KDE-bug 474110 +) |