summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-12-15 11:34:24 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-12-15 12:28:05 +0100
commit7a001371308fa1aaa8ddcc8ac77c768fa13f783a (patch)
treeffd18fc375263683978f00458124c5122c4464e0 /kde-plasma/kwin
parentsci-mathematics/singular: add julia and polymake useflags (diff)
downloadgentoo-7a001371308fa1aaa8ddcc8ac77c768fa13f783a.tar.gz
gentoo-7a001371308fa1aaa8ddcc8ac77c768fa13f783a.tar.bz2
gentoo-7a001371308fa1aaa8ddcc8ac77c768fa13f783a.zip
kde-plasma/kwin: Fix window sizing glitches, memleak/crash fixes
Upstream commit 77b678c522cce0e8e7b39087f74e2ac591cd28d0 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=445140 Upstream commit 8accc777a5b3ab1e53341f1838ed636652dc1221 KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=444429 KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=444381 KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=444077 KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=444429 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma/kwin')
-rw-r--r--kde-plasma/kwin/files/kwin-5.23.4-fix-memory-leak-caching-QSGTexture.patch50
-rw-r--r--kde-plasma/kwin/files/kwin-5.23.4-xdgshell-protect-from-invalid-frameGeometry.patch36
-rw-r--r--kde-plasma/kwin/kwin-5.23.4-r2.ebuild139
3 files changed, 225 insertions, 0 deletions
diff --git a/kde-plasma/kwin/files/kwin-5.23.4-fix-memory-leak-caching-QSGTexture.patch b/kde-plasma/kwin/files/kwin-5.23.4-fix-memory-leak-caching-QSGTexture.patch
new file mode 100644
index 000000000000..5abcfa49969c
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.23.4-fix-memory-leak-caching-QSGTexture.patch
@@ -0,0 +1,50 @@
+From 8accc777a5b3ab1e53341f1838ed636652dc1221 Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
+Date: Mon, 13 Dec 2021 12:53:32 +0200
+Subject: [PATCH] Fix memory leak in some plasma components
+
+A few plasma components cache QSGTexture. Those components rely on
+texture references going away with QSGNode users. However, with the
+current tear down logic, OffscreenQuickView won't destroy any paint
+nodes.
+
+Destroy QQuickRenderControl before QQuickWindow to ensure that are no
+paint nodes left alive after OffscreenQuickView.
+
+BUG: 444429
+BUG: 444381
+BUG: 444077
+BUG: 444306
+(cherry picked from commit 64f2cdf9ed290a1fb7c2bf41753613078eb023c4)
+---
+ src/libkwineffects/kwineffectquickview.cpp | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/src/libkwineffects/kwineffectquickview.cpp b/src/libkwineffects/kwineffectquickview.cpp
+index ca5a025729..14be1e1b25 100644
+--- a/src/libkwineffects/kwineffectquickview.cpp
++++ b/src/libkwineffects/kwineffectquickview.cpp
+@@ -160,13 +160,15 @@ EffectQuickView::EffectQuickView(QObject *parent, QWindow *renderWindow, ExportM
+ EffectQuickView::~EffectQuickView()
+ {
+ if (d->m_glcontext) {
+- d->m_glcontext->makeCurrent(d->m_offscreenSurface.data());
+ // close the view whilst we have an active GL context
+- delete d->m_view;
+- d->m_view = nullptr;
+- d->m_renderControl->invalidate();
+- d->m_glcontext->doneCurrent();
++ d->m_glcontext->makeCurrent(d->m_offscreenSurface.data());
+ }
++
++ delete d->m_renderControl; // Always delete render control first.
++ d->m_renderControl = nullptr;
++
++ delete d->m_view;
++ d->m_view = nullptr;
+ }
+
+ bool EffectQuickView::automaticRepaint() const
+--
+GitLab
+
diff --git a/kde-plasma/kwin/files/kwin-5.23.4-xdgshell-protect-from-invalid-frameGeometry.patch b/kde-plasma/kwin/files/kwin-5.23.4-xdgshell-protect-from-invalid-frameGeometry.patch
new file mode 100644
index 000000000000..a80348be3562
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.23.4-xdgshell-protect-from-invalid-frameGeometry.patch
@@ -0,0 +1,36 @@
+From 77b678c522cce0e8e7b39087f74e2ac591cd28d0 Mon Sep 17 00:00:00 2001
+From: Ismael Asensio <isma.af@gmail.com>
+Date: Sun, 12 Dec 2021 15:16:28 +0100
+Subject: [PATCH] XDGShellClient: Protect from invalid frameGeometry on
+ updateDecoration
+
+When updating window decoration do not try to restore the previous frameGeometry
+if it was invalid.
+
+This fixes the case when applying a `noBorder=true` rule on a newly created
+client would set it to a minimal window size
+
+Targeted at 5.23 only, since this codepath is being reworked for 5.24
+
+BUG: 445140
+FIXED-IN: 5.23.5
+---
+ src/xdgshellclient.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp
+index b4427b8cf7..75c4031498 100644
+--- a/src/xdgshellclient.cpp
++++ b/src/xdgshellclient.cpp
+@@ -637,7 +637,7 @@ void XdgToplevelClient::updateDecoration(bool check_workspace_pos, bool force)
+ scheduleConfigure();
+ }
+ updateShadow();
+- if (check_workspace_pos) {
++ if (check_workspace_pos && oldFrameGeometry.isValid()) {
+ const QRect oldGeometryRestore = geometryRestore();
+ setGeometryRestore(frameGeometry());
+ checkWorkspacePosition(oldFrameGeometry, oldClientGeometry);
+--
+GitLab
+
diff --git a/kde-plasma/kwin/kwin-5.23.4-r2.ebuild b/kde-plasma/kwin/kwin-5.23.4-r2.ebuild
new file mode 100644
index 000000000000..dcbd921d6a07
--- /dev/null
+++ b/kde-plasma/kwin/kwin-5.23.4-r2.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="optional"
+KFMIN=5.86.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org optfeature
+
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux"
+
+LICENSE="GPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="accessibility caps gles2-only multimedia plasma screencast"
+
+RESTRICT="test"
+
+COMMON_DEPEND="
+ >=dev-libs/libinput-1.14
+ >=dev-libs/wayland-1.2
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5=[gles2-only=,libinput]
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=dev-qt/qtx11extras-${QTMIN}:5
+ >=kde-frameworks/kactivities-${KFMIN}:5
+ >=kde-frameworks/kauth-${KFMIN}:5
+ >=kde-frameworks/kcmutils-${KFMIN}:5
+ >=kde-frameworks/kcompletion-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kcrash-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5=
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ >=kde-frameworks/kidletime-${KFMIN}:5=
+ >=kde-frameworks/knewstuff-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kpackage-${KFMIN}:5
+ >=kde-frameworks/kservice-${KFMIN}:5
+ >=kde-frameworks/ktextwidgets-${KFMIN}:5
+ >=kde-frameworks/kwayland-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5=[X]
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ >=kde-frameworks/plasma-${KFMIN}:5
+ >=kde-plasma/breeze-${PVCUT}:5
+ >=kde-plasma/kdecoration-${PVCUT}:5
+ >=kde-plasma/kscreenlocker-${PVCUT}:5
+ >=kde-plasma/kwayland-server-${PVCUT}:5
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/lcms:2
+ media-libs/libepoxy
+ >=media-libs/mesa-21.1[egl(+),gbm(+),wayland,X]
+ virtual/libudev:=
+ x11-libs/libX11
+ x11-libs/libXi
+ x11-libs/libdrm
+ >=x11-libs/libxcb-1.10
+ >=x11-libs/libxkbcommon-0.7.0
+ x11-libs/xcb-util-cursor
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-wm
+ accessibility? ( media-libs/libqaccessibilityclient:5 )
+ caps? ( sys-libs/libcap )
+ gles2-only? ( media-libs/mesa[gles2] )
+ plasma? ( >=kde-frameworks/krunner-${KFMIN}:5 )
+ screencast? ( >=media-video/pipewire-0.3:= )
+"
+RDEPEND="${COMMON_DEPEND}
+ >=dev-qt/qtquickcontrols-${QTMIN}:5
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5
+ >=dev-qt/qtvirtualkeyboard-${QTMIN}:5
+ >=kde-frameworks/kirigami-${KFMIN}:5
+ >=kde-frameworks/kitemmodels-${KFMIN}:5[qml]
+ sys-apps/hwdata
+ x11-base/xwayland
+ multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] )
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-qt/designer-${QTMIN}:5
+ >=dev-qt/qtconcurrent-${QTMIN}:5
+ x11-base/xorg-proto
+ test? (
+ >=dev-libs/wayland-protocols-1.19
+ >=dev-qt/qtwayland-${QTMIN}:5
+ )
+"
+PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-wayland-resize-to-last-requested-client-size.patch # KDE-bug 444962
+ "${FILESDIR}"/${P}-scripting-fix-KWinComponents-Workspace-type.patch
+ "${FILESDIR}"/${P}-drm-remove-dpms-filter-when-outputs-are-added.patch # KDE-bug 446699
+ "${FILESDIR}"/${P}-xdgshell-protect-from-invalid-frameGeometry.patch # KDE-bug 445140
+ "${FILESDIR}"/${P}-fix-memory-leak-caching-QSGTexture.patch # KDE-bug 444077 +more
+)
+
+src_prepare() {
+ ecm_src_prepare
+ use multimedia || eapply "${FILESDIR}/${PN}-5.21.80-gstreamer-optional.patch"
+
+ # TODO: try to get a build switch upstreamed
+ if ! use screencast; then
+ sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package accessibility QAccessibilityClient)
+ $(cmake_use_find_package caps Libcap)
+ $(cmake_use_find_package plasma KF5Runner)
+ )
+
+ ecm_src_configure
+}
+
+pkg_postinst() {
+ ecm_pkg_postinst
+ optfeature "color management support" x11-misc/colord
+ elog
+ elog "In Plasma 5.20, default behavior of the Task Switcher to move minimised"
+ elog "windows to the end of the list was changed so that it remains in the"
+ elog "original order. To revert to the well established behavior:"
+ elog
+ elog " - Edit ~/.config/kwinrc"
+ elog " - Find [TabBox] section"
+ elog " - Add \"MoveMinimizedWindowsToEndOfTabBoxFocusChain=true\""
+}