diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-08-13 22:11:26 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2021-08-13 22:13:47 +0200 |
commit | 9a6221644bee352314ff6e2047f415dd289f5d06 (patch) | |
tree | 47e04f774aa2a8b5025798b68ca2509ef714adad /kde-apps | |
parent | kde-apps/konsole: Prevent window "flashing" when closing last session (diff) | |
download | gentoo-9a6221644bee352314ff6e2047f415dd289f5d06.tar.gz gentoo-9a6221644bee352314ff6e2047f415dd289f5d06.tar.bz2 gentoo-9a6221644bee352314ff6e2047f415dd289f5d06.zip |
kde-apps/konsole: Fix crash when setting blur effect
Upstream commit f24dd6acc28393ba6f731be1360731c01a9a1ef0
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=439871
Closes: https://bugs.gentoo.org/807905
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-apps')
-rw-r--r-- | kde-apps/konsole/files/konsole-21.08.0-fix-crash-w-blur.patch | 49 | ||||
-rw-r--r-- | kde-apps/konsole/konsole-21.08.0-r1.ebuild | 1 |
2 files changed, 50 insertions, 0 deletions
diff --git a/kde-apps/konsole/files/konsole-21.08.0-fix-crash-w-blur.patch b/kde-apps/konsole/files/konsole-21.08.0-fix-crash-w-blur.patch new file mode 100644 index 000000000000..b0c7193eda84 --- /dev/null +++ b/kde-apps/konsole/files/konsole-21.08.0-fix-crash-w-blur.patch @@ -0,0 +1,49 @@ +From f24dd6acc28393ba6f731be1360731c01a9a1ef0 Mon Sep 17 00:00:00 2001 +From: Ahmad Samir <a.samirh78@gmail.com> +Date: Fri, 16 Jul 2021 21:37:51 +0200 +Subject: [PATCH] Fix crash when setting blur effect + +Basically to use QWidget::windowHandle() to get a QWindow*, we need to first +set the Qt::WA_NativeWindow attribute on the QWidget. See: +https://phabricator.kde.org/D23108 + +BUG: 439871 +FIXED-IN: 21.12 +(cherry picked from commit a6b2bd539162b39191e827566b656bd97266ffad) +--- + src/MainWindow.cpp | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp +index ed5d8cc3d..c67acf8b9 100644 +--- a/src/MainWindow.cpp ++++ b/src/MainWindow.cpp +@@ -56,6 +56,8 @@ + #include "terminalDisplay/TerminalDisplay.h" + #include "widgets/ViewContainer.h" + ++#include <konsoledebug.h> ++ + using namespace Konsole; + + MainWindow::MainWindow() : +@@ -889,7 +891,15 @@ void MainWindow::setBlur(bool blur) + #if KWINDOWSYSTEM_VERSION < QT_VERSION_CHECK(5,82,0) + KWindowEffects::enableBlurBehind(winId(), blur); + #else +- KWindowEffects::enableBlurBehind(windowHandle(), blur); ++ // Set the WA_NativeWindow attribute to force the creation of the QWindow. ++ // Without this QWidget::windowHandle() returns 0. ++ // See https://phabricator.kde.org/D23108 ++ setAttribute(Qt::WA_NativeWindow); ++ if (QWindow *window = windowHandle()) { ++ KWindowEffects::enableBlurBehind(window, blur); ++ } else { ++ qCWarning(KonsoleDebug) << "Blur effect couldn't be enabled."; ++ } + #endif + } + } +-- +GitLab + diff --git a/kde-apps/konsole/konsole-21.08.0-r1.ebuild b/kde-apps/konsole/konsole-21.08.0-r1.ebuild index a9745100e0f6..4095d9ac5f9e 100644 --- a/kde-apps/konsole/konsole-21.08.0-r1.ebuild +++ b/kde-apps/konsole/konsole-21.08.0-r1.ebuild @@ -52,6 +52,7 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}/${PN}-21.04.3-no-flash-on-session-close.patch" # bug 807933 + "${FILESDIR}/${P}-fix-crash-w-blur.patch" # bug 807905, fixed in 21.08.1 ) src_configure() { |