commit:     de40a4db73bc5972feef63106982b5db8f3f853a
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue May 17 18:41:21 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue May 17 19:01:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de40a4db

kde-plasma/kscreen: Backport several 5.24.6 fixes

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...ct-ext-monitors-when-a-monitor-is-rotated.patch | 31 +++++++++++++
 ...reen-5.24.5-kcm-fix-choosing-refresh-rate.patch | 28 ++++++++++++
 ...4.5-kcm-fix-refresh-rate-list-not-updated.patch | 29 ++++++++++++
 kde-plasma/kscreen/kscreen-5.24.5-r1.ebuild        | 52 ++++++++++++++++++++++
 4 files changed, 140 insertions(+)

diff --git 
a/kde-plasma/kscreen/files/kscreen-5.24.5-fix-connect-ext-monitors-when-a-monitor-is-rotated.patch
 
b/kde-plasma/kscreen/files/kscreen-5.24.5-fix-connect-ext-monitors-when-a-monitor-is-rotated.patch
new file mode 100644
index 000000000000..d2efce69b9e5
--- /dev/null
+++ 
b/kde-plasma/kscreen/files/kscreen-5.24.5-fix-connect-ext-monitors-when-a-monitor-is-rotated.patch
@@ -0,0 +1,31 @@
+From ff8dc215e8d2691fcf41d0bb305f820531d95150 Mon Sep 17 00:00:00 2001
+From: Aleix Pol <[email protected]>
+Date: Sat, 14 May 2022 01:29:01 +0200
+Subject: [PATCH] Fix connecting external monitors when a monitor is rotated
+
+It would be placed right by the unrotated geometry and after rotating it
+the new output would end up floating in the logical space.
+This happened because the explicitLogicalSize is cached and needs
+updating after changing its settings.
+
+
+(cherry picked from commit cc832fd4296440fcd9298cb03b0cc736a99ed8bb)
+---
+ kded/generator.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/kded/generator.cpp b/kded/generator.cpp
+index e5117a9..e311b04 100644
+--- a/kded/generator.cpp
++++ b/kded/generator.cpp
+@@ -85,6 +85,7 @@ KScreen::ConfigPtr Generator::idealConfig(const 
KScreen::ConfigPtr &currentConfi
+ 
+     for (const auto &output : connectedOutputs) {
+         initializeOutput(output, config->supportedFeatures());
++        output->setExplicitLogicalSize(config->logicalSizeForOutput(*output));
+     }
+ 
+     if (connectedOutputs.count() == 1) {
+-- 
+GitLab
+

diff --git 
a/kde-plasma/kscreen/files/kscreen-5.24.5-kcm-fix-choosing-refresh-rate.patch 
b/kde-plasma/kscreen/files/kscreen-5.24.5-kcm-fix-choosing-refresh-rate.patch
new file mode 100644
index 000000000000..2d0d3ba1e851
--- /dev/null
+++ 
b/kde-plasma/kscreen/files/kscreen-5.24.5-kcm-fix-choosing-refresh-rate.patch
@@ -0,0 +1,28 @@
+From 6ecb832923612820c721f58d1d12dd176e10528a Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <[email protected]>
+Date: Thu, 5 May 2022 18:27:38 +0200
+Subject: [PATCH] kcm: fix choosing the refresh rate
+
+It always chose the last one, and not the highest one
+
+
+(cherry picked from commit 5e1be88dbe6e5160dcc232631df81d9bdc9d179e)
+---
+ kcm/output_model.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/kcm/output_model.cpp b/kcm/output_model.cpp
+index 92e4ea3..3672b49 100644
+--- a/kcm/output_model.cpp
++++ b/kcm/output_model.cpp
+@@ -394,6 +394,7 @@ bool OutputModel::setResolution(int outputIndex, int 
resIndex)
+         auto it = modes.begin();
+         while (it != modes.end()) {
+             if ((*it)->size() == size && (*it)->refreshRate() > 
bestRefreshRate) {
++                bestRefreshRate = (*it)->refreshRate();
+                 modeIt = it;
+             }
+             it++;
+-- 
+GitLab
+

diff --git 
a/kde-plasma/kscreen/files/kscreen-5.24.5-kcm-fix-refresh-rate-list-not-updated.patch
 
b/kde-plasma/kscreen/files/kscreen-5.24.5-kcm-fix-refresh-rate-list-not-updated.patch
new file mode 100644
index 000000000000..e7d85fd87013
--- /dev/null
+++ 
b/kde-plasma/kscreen/files/kscreen-5.24.5-kcm-fix-refresh-rate-list-not-updated.patch
@@ -0,0 +1,29 @@
+From 584ed8a067a7c0329e1572dd9970b6e3dae6a56f Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <[email protected]>
+Date: Thu, 5 May 2022 18:22:46 +0200
+Subject: [PATCH] kcm: fix refresh rate list not being updated
+
+BUG: 453392
+
+
+(cherry picked from commit 8c1e2cffda762fef83ea48658a08847382c71486)
+---
+ kcm/output_model.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kcm/output_model.cpp b/kcm/output_model.cpp
+index fcdb738..92e4ea3 100644
+--- a/kcm/output_model.cpp
++++ b/kcm/output_model.cpp
+@@ -417,7 +417,7 @@ bool OutputModel::setResolution(int outputIndex, int 
resIndex)
+     QModelIndex index = createIndex(outputIndex, 0);
+     // Calling this directly ignores possible optimization when the
+     // refresh rate hasn't changed in fact. But that's ok.
+-    Q_EMIT dataChanged(index, index, {ResolutionIndexRole, ResolutionRole, 
SizeRole, RefreshRateIndexRole});
++    Q_EMIT dataChanged(index, index, {ResolutionIndexRole, ResolutionRole, 
SizeRole, RefreshRatesRole, RefreshRateIndexRole});
+     Q_EMIT sizeChanged();
+     return true;
+ }
+-- 
+GitLab
+

diff --git a/kde-plasma/kscreen/kscreen-5.24.5-r1.ebuild 
b/kde-plasma/kscreen/kscreen-5.24.5-r1.ebuild
new file mode 100644
index 000000000000..0fa224e22205
--- /dev/null
+++ b/kde-plasma/kscreen/kscreen-5.24.5-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="forceoptional"
+KFMIN=5.90.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+inherit ecm 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 ~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
+       >=kde-frameworks/kcmutils-${KFMIN}:5
+       >=kde-frameworks/kconfig-${KFMIN}:5
+       >=kde-frameworks/kconfigwidgets-${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/kiconthemes-${KFMIN}:5
+       >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+       >=kde-frameworks/kxmlgui-${KFMIN}:5
+       >=kde-frameworks/plasma-${KFMIN}:5
+       >=kde-plasma/libkscreen-${PVCUT}:5
+"
+RDEPEND="${DEPEND}
+       >=dev-qt/qtgraphicaleffects-${QTMIN}:5
+       >=kde-plasma/kde-cli-tools-${PVCUT}:5
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-kcm-fix-refresh-rate-list-not-updated.patch" # 
KDE-bug 453392
+       "${FILESDIR}/${P}-kcm-fix-choosing-refresh-rate.patch"
+       
"${FILESDIR}/${P}-fix-connect-ext-monitors-when-a-monitor-is-rotated.patch"
+)

Reply via email to