1 |
commit: cb2f22e3e5634860303b198e6b5a4450865d9009 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 17 18:12:40 2022 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 17 19:01:45 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb2f22e3 |
7 |
|
8 |
kde-plasma/kwin: Backport several 5.24.6 fixes |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
.../kwin-5.24.5-effects-overview-hide-panels.patch | 65 ++++++++++ |
14 |
.../kwin-5.24.5-fix-multi-gpu-double-copy.patch | 59 +++++++++ |
15 |
.../kwin-5.24.5-fix-nvidia-render-glitches.patch | 42 +++++++ |
16 |
.../kwin-5.24.5-tabbox-dont-dismiss-popups.patch | 32 +++++ |
17 |
kde-plasma/kwin/kwin-5.24.5-r1.ebuild | 140 +++++++++++++++++++++ |
18 |
5 files changed, 338 insertions(+) |
19 |
|
20 |
diff --git a/kde-plasma/kwin/files/kwin-5.24.5-effects-overview-hide-panels.patch b/kde-plasma/kwin/files/kwin-5.24.5-effects-overview-hide-panels.patch |
21 |
new file mode 100644 |
22 |
index 000000000000..d5b1f8c3864e |
23 |
--- /dev/null |
24 |
+++ b/kde-plasma/kwin/files/kwin-5.24.5-effects-overview-hide-panels.patch |
25 |
@@ -0,0 +1,65 @@ |
26 |
+From 7fcf36d636f62f101397d88ad6c448f54da79e46 Mon Sep 17 00:00:00 2001 |
27 |
+From: Marco Martin <notmart@×××××.com> |
28 |
+Date: Fri, 13 May 2022 15:37:13 +0000 |
29 |
+Subject: [PATCH] effects/overview: hide panels |
30 |
+ |
31 |
+This makes it consistent with WindowView (and the panel window doesn't respond |
32 |
+to input anyways even if shown, which is misleading). |
33 |
+ |
34 |
+BUG: 444274 |
35 |
+FIXED-IN: 5.24.6 |
36 |
+ |
37 |
+ |
38 |
+(cherry picked from commit db2af5500f964f3eefde60183b69f21125aeb194) |
39 |
+--- |
40 |
+ src/effects/overview/qml/ScreenView.qml | 20 ++++++++------------ |
41 |
+ 1 file changed, 8 insertions(+), 12 deletions(-) |
42 |
+ |
43 |
+diff --git a/src/effects/overview/qml/ScreenView.qml b/src/effects/overview/qml/ScreenView.qml |
44 |
+index 40cc29f4c7..39119e40b9 100644 |
45 |
+--- a/src/effects/overview/qml/ScreenView.qml |
46 |
++++ b/src/effects/overview/qml/ScreenView.qml |
47 |
+@@ -70,16 +70,8 @@ FocusScope { |
48 |
+ } |
49 |
+ } |
50 |
+ |
51 |
+- ExpoArea { |
52 |
+- id: heapArea |
53 |
+- screen: targetScreen |
54 |
+- } |
55 |
+- |
56 |
+ Column { |
57 |
+- x: heapArea.x |
58 |
+- y: heapArea.y |
59 |
+- width: heapArea.width |
60 |
+- height: heapArea.height |
61 |
++ anchors.fill: parent |
62 |
+ |
63 |
+ Item { |
64 |
+ id: topBar |
65 |
+@@ -176,15 +168,19 @@ FocusScope { |
66 |
+ |
67 |
+ KWinComponents.WindowThumbnailItem { |
68 |
+ id: windowThumbnail |
69 |
+- visible: !model.client.hidden |
70 |
++ visible: !model.client.hidden && opacity > 0 |
71 |
+ wId: model.client.internalId |
72 |
+ x: model.client.x - targetScreen.geometry.x |
73 |
+ y: model.client.y - targetScreen.geometry.y |
74 |
+ width: model.client.width |
75 |
+ height: model.client.height |
76 |
++ opacity: container.effect.gestureInProgress |
77 |
++ ? 1 - container.effect.partialActivationFactor |
78 |
++ : (model.client.hidden || container.organized) ? 0 : 1 |
79 |
+ |
80 |
+- TapHandler { |
81 |
+- onTapped: effect.deactivate(); |
82 |
++ Behavior on opacity { |
83 |
++ enabled: !container.effect.gestureInProgress |
84 |
++ NumberAnimation { duration: animationDuration; easing.type: Easing.OutCubic } |
85 |
+ } |
86 |
+ } |
87 |
+ } |
88 |
+-- |
89 |
+GitLab |
90 |
+ |
91 |
|
92 |
diff --git a/kde-plasma/kwin/files/kwin-5.24.5-fix-multi-gpu-double-copy.patch b/kde-plasma/kwin/files/kwin-5.24.5-fix-multi-gpu-double-copy.patch |
93 |
new file mode 100644 |
94 |
index 000000000000..53c05da522ec |
95 |
--- /dev/null |
96 |
+++ b/kde-plasma/kwin/files/kwin-5.24.5-fix-multi-gpu-double-copy.patch |
97 |
@@ -0,0 +1,59 @@ |
98 |
+From 3b58fe4bde0722b352e4114adb992a2ed2c96423 Mon Sep 17 00:00:00 2001 |
99 |
+From: Xaver Hugl <xaver.hugl@×××××.com> |
100 |
+Date: Sat, 7 May 2022 21:23:17 +0200 |
101 |
+Subject: [PATCH] backends/drm: consider escaped separators KWIN_DRM_DEVICES |
102 |
+ |
103 |
+':' conflicts with the file names in /dev/dri/by-path, so allow it to be |
104 |
+escaped with '\' |
105 |
+ |
106 |
+CCBUG: 453386 |
107 |
+ |
108 |
+ |
109 |
+(cherry picked from commit a110aabbccf56019bdc324b3c751112f35ec3f6c) |
110 |
+--- |
111 |
+ src/backends/drm/drm_backend.cpp | 24 +++++++++++++++++++++++- |
112 |
+ 1 file changed, 23 insertions(+), 1 deletion(-) |
113 |
+ |
114 |
+diff --git a/src/backends/drm/drm_backend.cpp b/src/backends/drm/drm_backend.cpp |
115 |
+index 272dba702c..567ea3f696 100644 |
116 |
+--- a/src/backends/drm/drm_backend.cpp |
117 |
++++ b/src/backends/drm/drm_backend.cpp |
118 |
+@@ -57,12 +57,34 @@ |
119 |
+ namespace KWin |
120 |
+ { |
121 |
+ |
122 |
++static QStringList splitPathList(const QString &input, const QChar delimiter) |
123 |
++{ |
124 |
++ QStringList ret; |
125 |
++ QString tmp; |
126 |
++ for (int i = 0; i < input.size(); i++) { |
127 |
++ if (input[i] == delimiter) { |
128 |
++ if (i > 0 && input[i - 1] == '\\') { |
129 |
++ tmp[tmp.size() - 1] = delimiter; |
130 |
++ } else if (!tmp.isEmpty()) { |
131 |
++ ret.append(tmp); |
132 |
++ tmp = QString(); |
133 |
++ } |
134 |
++ } else { |
135 |
++ tmp.append(input[i]); |
136 |
++ } |
137 |
++ } |
138 |
++ if (!tmp.isEmpty()) { |
139 |
++ ret.append(tmp); |
140 |
++ } |
141 |
++ return ret; |
142 |
++} |
143 |
++ |
144 |
+ DrmBackend::DrmBackend(QObject *parent) |
145 |
+ : Platform(parent) |
146 |
+ , m_udev(new Udev) |
147 |
+ , m_udevMonitor(m_udev->monitor()) |
148 |
+ , m_session(Session::create(this)) |
149 |
+- , m_explicitGpus(qEnvironmentVariable("KWIN_DRM_DEVICES").split(':', Qt::SkipEmptyParts)) |
150 |
++ , m_explicitGpus(splitPathList(qEnvironmentVariable("KWIN_DRM_DEVICES"), ':')) |
151 |
+ , m_dpmsFilter() |
152 |
+ { |
153 |
+ setSupportsPointerWarping(true); |
154 |
+-- |
155 |
+GitLab |
156 |
+ |
157 |
|
158 |
diff --git a/kde-plasma/kwin/files/kwin-5.24.5-fix-nvidia-render-glitches.patch b/kde-plasma/kwin/files/kwin-5.24.5-fix-nvidia-render-glitches.patch |
159 |
new file mode 100644 |
160 |
index 000000000000..d38e11375bbe |
161 |
--- /dev/null |
162 |
+++ b/kde-plasma/kwin/files/kwin-5.24.5-fix-nvidia-render-glitches.patch |
163 |
@@ -0,0 +1,42 @@ |
164 |
+From e2d271b6365188a86755af82745ad37535ceb4d7 Mon Sep 17 00:00:00 2001 |
165 |
+From: Erik Kurzinger <ekurzinger@××××××.com> |
166 |
+Date: Sun, 8 May 2022 12:16:20 -0700 |
167 |
+Subject: [PATCH] platforms/drm: set read buffer in |
168 |
+ GbmSurface::makeContextCurrent |
169 |
+ |
170 |
+The first time the GBM backend's EGL context is made current after |
171 |
+creation, both the read and draw surfaces are set to EGL_NO_SURFACE. |
172 |
+This will set the GL read and draw buffers to GL_NONE in accordance with |
173 |
+the EGL spec. |
174 |
+ |
175 |
+When a real surface is later made current, however, the spec is arguably |
176 |
+unclear on whether the read and draw buffers should remain set to |
177 |
+GL_NONE or whether they should be restored to the default GL_BACK. The |
178 |
+Mesa driver does the latter, the NVIDIA driver does the former. |
179 |
+ |
180 |
+To work around this difference, Kwin has an explicit call to |
181 |
+glDrawBuffer in GbmSurface::makeContextCurrent. It does not have a |
182 |
+corresponding call to glReadBuffer, though, which can cause some desktop |
183 |
+effects such as background contrast to render incorrectly with the |
184 |
+NVIDIA driver. This change adds that missing call. |
185 |
+ |
186 |
+(cherry picked from commit e6d2bc153f499d1ec3510c02badca38d4c42c340) |
187 |
+--- |
188 |
+ src/backends/drm/egl_gbm_backend.cpp | 1 + |
189 |
+ 1 file changed, 1 insertion(+) |
190 |
+ |
191 |
+diff --git a/src/backends/drm/egl_gbm_backend.cpp b/src/backends/drm/egl_gbm_backend.cpp |
192 |
+index 5a0be7ccaf..b34fa1320b 100644 |
193 |
+--- a/src/backends/drm/egl_gbm_backend.cpp |
194 |
++++ b/src/backends/drm/egl_gbm_backend.cpp |
195 |
+@@ -377,6 +377,7 @@ bool EglGbmBackend::makeContextCurrent(const Output::RenderData &render) const |
196 |
+ } |
197 |
+ if (!GLPlatform::instance()->isGLES()) { |
198 |
+ glDrawBuffer(GL_BACK); |
199 |
++ glReadBuffer(GL_BACK); |
200 |
+ } |
201 |
+ return true; |
202 |
+ } |
203 |
+-- |
204 |
+GitLab |
205 |
+ |
206 |
|
207 |
diff --git a/kde-plasma/kwin/files/kwin-5.24.5-tabbox-dont-dismiss-popups.patch b/kde-plasma/kwin/files/kwin-5.24.5-tabbox-dont-dismiss-popups.patch |
208 |
new file mode 100644 |
209 |
index 000000000000..f79d4bba71ce |
210 |
--- /dev/null |
211 |
+++ b/kde-plasma/kwin/files/kwin-5.24.5-tabbox-dont-dismiss-popups.patch |
212 |
@@ -0,0 +1,32 @@ |
213 |
+From f7b1edc79e9526fe6bad69a8ad475a5d77e5aead Mon Sep 17 00:00:00 2001 |
214 |
+From: Xaver Hugl <xaver.hugl@×××××.com> |
215 |
+Date: Tue, 10 May 2022 13:07:03 +0200 |
216 |
+Subject: [PATCH] tabbox: don't dismiss popups |
217 |
+ |
218 |
+The glitches that dismissing popups was supposed to prevent are apparently |
219 |
+no longer present. |
220 |
+ |
221 |
+BUG: 446318 |
222 |
+(cherry picked from commit 94b0ca814688bf3622aa53f4d4d26f97d8de7306) |
223 |
+--- |
224 |
+ src/tabbox/tabbox.cpp | 4 ---- |
225 |
+ 1 file changed, 4 deletions(-) |
226 |
+ |
227 |
+diff --git a/src/tabbox/tabbox.cpp b/src/tabbox/tabbox.cpp |
228 |
+index a1c50b27fc..76a50795ad 100644 |
229 |
+--- a/src/tabbox/tabbox.cpp |
230 |
++++ b/src/tabbox/tabbox.cpp |
231 |
+@@ -1020,10 +1020,6 @@ void TabBox::navigatingThroughWindows(bool forward, const QKeySequence &shortcut |
232 |
+ // CDE style raise / lower |
233 |
+ CDEWalkThroughWindows(forward); |
234 |
+ } else { |
235 |
+- workspace()->forEachAbstractClient([](Toplevel *toplevel) { |
236 |
+- if (toplevel->isPopupWindow()) |
237 |
+- toplevel->popupDone(); |
238 |
+- }); |
239 |
+ if (areModKeysDepressed(shortcut)) { |
240 |
+ if (startKDEWalkThroughWindows(mode)) |
241 |
+ KDEWalkThroughWindows(forward); |
242 |
+-- |
243 |
+GitLab |
244 |
+ |
245 |
|
246 |
diff --git a/kde-plasma/kwin/kwin-5.24.5-r1.ebuild b/kde-plasma/kwin/kwin-5.24.5-r1.ebuild |
247 |
new file mode 100644 |
248 |
index 000000000000..12d15b83a199 |
249 |
--- /dev/null |
250 |
+++ b/kde-plasma/kwin/kwin-5.24.5-r1.ebuild |
251 |
@@ -0,0 +1,140 @@ |
252 |
+# Copyright 1999-2022 Gentoo Authors |
253 |
+# Distributed under the terms of the GNU General Public License v2 |
254 |
+ |
255 |
+EAPI=8 |
256 |
+ |
257 |
+ECM_HANDBOOK="optional" |
258 |
+ECM_TEST="optional" |
259 |
+KFMIN=5.90.0 |
260 |
+PVCUT=$(ver_cut 1-3) |
261 |
+QTMIN=5.15.2 |
262 |
+VIRTUALX_REQUIRED="test" |
263 |
+inherit ecm kde.org optfeature |
264 |
+ |
265 |
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux" |
266 |
+ |
267 |
+LICENSE="GPL-2+" |
268 |
+SLOT="5" |
269 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" |
270 |
+IUSE="accessibility caps gles2-only multimedia plasma screencast" |
271 |
+ |
272 |
+RESTRICT="test" |
273 |
+ |
274 |
+COMMON_DEPEND=" |
275 |
+ >=dev-libs/libinput-1.19 |
276 |
+ >=dev-libs/wayland-1.2 |
277 |
+ >=dev-qt/qtdbus-${QTMIN}:5 |
278 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5 |
279 |
+ >=dev-qt/qtgui-${QTMIN}:5=[gles2-only=,libinput] |
280 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
281 |
+ >=dev-qt/qtx11extras-${QTMIN}:5 |
282 |
+ >=kde-frameworks/kactivities-${KFMIN}:5 |
283 |
+ >=kde-frameworks/kauth-${KFMIN}:5 |
284 |
+ >=kde-frameworks/kcmutils-${KFMIN}:5 |
285 |
+ >=kde-frameworks/kcompletion-${KFMIN}:5 |
286 |
+ >=kde-frameworks/kconfig-${KFMIN}:5 |
287 |
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5 |
288 |
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5 |
289 |
+ >=kde-frameworks/kcrash-${KFMIN}:5 |
290 |
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5 |
291 |
+ >=kde-frameworks/kdeclarative-${KFMIN}:5 |
292 |
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5= |
293 |
+ >=kde-frameworks/ki18n-${KFMIN}:5 |
294 |
+ >=kde-frameworks/kiconthemes-${KFMIN}:5 |
295 |
+ >=kde-frameworks/kidletime-${KFMIN}:5= |
296 |
+ >=kde-frameworks/knewstuff-${KFMIN}:5 |
297 |
+ >=kde-frameworks/knotifications-${KFMIN}:5 |
298 |
+ >=kde-frameworks/kpackage-${KFMIN}:5 |
299 |
+ >=kde-frameworks/kservice-${KFMIN}:5 |
300 |
+ >=kde-frameworks/ktextwidgets-${KFMIN}:5 |
301 |
+ >=kde-frameworks/kwayland-${KFMIN}:5 |
302 |
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 |
303 |
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5=[X] |
304 |
+ >=kde-frameworks/kxmlgui-${KFMIN}:5 |
305 |
+ >=kde-frameworks/plasma-${KFMIN}:5 |
306 |
+ >=kde-plasma/breeze-${PVCUT}:5 |
307 |
+ >=kde-plasma/kdecoration-${PVCUT}:5 |
308 |
+ >=kde-plasma/kscreenlocker-${PVCUT}:5 |
309 |
+ >=kde-plasma/kwayland-server-${PVCUT}:5 |
310 |
+ media-libs/fontconfig |
311 |
+ media-libs/freetype |
312 |
+ media-libs/lcms:2 |
313 |
+ media-libs/libepoxy |
314 |
+ >=media-libs/mesa-21.1[egl(+),gbm(+),wayland,X] |
315 |
+ virtual/libudev:= |
316 |
+ x11-libs/libX11 |
317 |
+ x11-libs/libXi |
318 |
+ x11-libs/libdrm |
319 |
+ >=x11-libs/libxcb-1.10 |
320 |
+ >=x11-libs/libxkbcommon-0.7.0 |
321 |
+ x11-libs/xcb-util-cursor |
322 |
+ x11-libs/xcb-util-image |
323 |
+ x11-libs/xcb-util-keysyms |
324 |
+ x11-libs/xcb-util-wm |
325 |
+ accessibility? ( media-libs/libqaccessibilityclient:5 ) |
326 |
+ caps? ( sys-libs/libcap ) |
327 |
+ gles2-only? ( media-libs/mesa[gles2] ) |
328 |
+ plasma? ( >=kde-frameworks/krunner-${KFMIN}:5 ) |
329 |
+ screencast? ( >=media-video/pipewire-0.3:= ) |
330 |
+" |
331 |
+RDEPEND="${COMMON_DEPEND} |
332 |
+ >=dev-qt/qtquickcontrols-${QTMIN}:5 |
333 |
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5 |
334 |
+ >=dev-qt/qtvirtualkeyboard-${QTMIN}:5 |
335 |
+ >=kde-frameworks/kirigami-${KFMIN}:5 |
336 |
+ >=kde-frameworks/kitemmodels-${KFMIN}:5[qml] |
337 |
+ sys-apps/hwdata |
338 |
+ x11-base/xwayland |
339 |
+ multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] ) |
340 |
+" |
341 |
+DEPEND="${COMMON_DEPEND} |
342 |
+ >=dev-qt/designer-${QTMIN}:5 |
343 |
+ >=dev-qt/qtconcurrent-${QTMIN}:5 |
344 |
+ x11-base/xorg-proto |
345 |
+ test? ( |
346 |
+ dev-libs/plasma-wayland-protocols |
347 |
+ >=dev-libs/wayland-protocols-1.19 |
348 |
+ ) |
349 |
+" |
350 |
+BDEPEND="test? ( >=dev-qt/qtwaylandscanner-${QTMIN}:5 )" |
351 |
+PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5" |
352 |
+ |
353 |
+PATCHES=( |
354 |
+ "${FILESDIR}"/${P}-fix-multi-gpu-double-copy.patch # KDE-bug 453386 |
355 |
+ "${FILESDIR}"/${P}-tabbox-dont-dismiss-popups.patch # KDE-bug 446318 |
356 |
+ "${FILESDIR}"/${P}-effects-overview-hide-panels.patch # KDE-bug 444274 |
357 |
+ "${FILESDIR}"/${P}-fix-nvidia-render-glitches.patch |
358 |
+) |
359 |
+ |
360 |
+src_prepare() { |
361 |
+ ecm_src_prepare |
362 |
+ use multimedia || eapply "${FILESDIR}/${PN}-5.21.80-gstreamer-optional.patch" |
363 |
+ |
364 |
+ # TODO: try to get a build switch upstreamed |
365 |
+ if ! use screencast; then |
366 |
+ sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die |
367 |
+ fi |
368 |
+} |
369 |
+ |
370 |
+src_configure() { |
371 |
+ local mycmakeargs=( |
372 |
+ $(cmake_use_find_package accessibility QAccessibilityClient) |
373 |
+ $(cmake_use_find_package caps Libcap) |
374 |
+ $(cmake_use_find_package plasma KF5Runner) |
375 |
+ ) |
376 |
+ |
377 |
+ ecm_src_configure |
378 |
+} |
379 |
+ |
380 |
+pkg_postinst() { |
381 |
+ ecm_pkg_postinst |
382 |
+ optfeature "color management support" x11-misc/colord |
383 |
+ elog |
384 |
+ elog "In Plasma 5.20, default behavior of the Task Switcher to move minimised" |
385 |
+ elog "windows to the end of the list was changed so that it remains in the" |
386 |
+ elog "original order. To revert to the well established behavior:" |
387 |
+ elog |
388 |
+ elog " - Edit ~/.config/kwinrc" |
389 |
+ elog " - Find [TabBox] section" |
390 |
+ elog " - Add \"MoveMinimizedWindowsToEndOfTabBoxFocusChain=true\"" |
391 |
+} |