diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-14 10:30:13 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-14 10:30:13 +0100 |
commit | 616579b5d773c50af31ee56f00105d96ce641ca2 (patch) | |
tree | 2ad4d3ba1429bd93a36ab99a2f5ec3490412115e /kde-apps/konsole/files | |
parent | 068424b26532f3551a81421a9be67ed206e5c11a (diff) |
gentoo resync : 14.08.2021
Diffstat (limited to 'kde-apps/konsole/files')
-rw-r--r-- | kde-apps/konsole/files/konsole-21.04.3-no-flash-on-session-close.patch | 81 | ||||
-rw-r--r-- | kde-apps/konsole/files/konsole-21.08.0-fix-crash-w-blur.patch | 49 |
2 files changed, 130 insertions, 0 deletions
diff --git a/kde-apps/konsole/files/konsole-21.04.3-no-flash-on-session-close.patch b/kde-apps/konsole/files/konsole-21.04.3-no-flash-on-session-close.patch new file mode 100644 index 000000000000..d8b14f2f1660 --- /dev/null +++ b/kde-apps/konsole/files/konsole-21.04.3-no-flash-on-session-close.patch @@ -0,0 +1,81 @@ +From 302c16791935cc3cf262aee355afce13d694b00f Mon Sep 17 00:00:00 2001 +From: Ahmad Samir <a.samirh78@gmail.com> +Date: Thu, 12 Aug 2021 13:58:20 +0200 +Subject: [PATCH] Prevent window "flashing" when closing the last session + +There are two scenarios when closing a window: +A) clicking the close button on the title bar (or Ctrl+Shift+Q): +~MainWindow() +~ViewManager() +~TabbedViewContainer() +~TerminalDisplay() +~Session() + +B) closing the last session/tab in a window: +SessionController::sessionFinished() +~Session() +~TerminalDisplay() +~TabbedViewContainer() +~MainWindow() +~ViewManager() + +the issue with the second case is that the TerminalDisplay is torn down +first, which exposes the TabbedViewContainer widget, the latter has the same +Qt::Window colour as the system colour scheme window background colour, if +you're using a dark terminal colour scheme and a light-coloured system colour +scheme, you could see some "flashing" when you close the last session with +e.g. Ctrl+D. + +To fix this, in sessionFinished() check if TabbedViewContainer::count() is +1 (i.e. closing last tab/session), and emit the empty() signal in that case, +which is connected to MainwWindow::close(), then the order of tear down +becomes: +SessionController::sessionFinished() +~Session() +~MainWindow() +~ViewManager() +~TabbedViewContainer() +~TerminalDisplay() + +BUG: 432077 +FIXED-IN: 21.12 +(cherry picked from commit bbec72250d080ce286a6762fb9beee4b6e7981c9) +--- + src/MainWindow.cpp | 2 +- + src/ViewManager.cpp | 7 +++++++ + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp +index cc38b3990..0fae334de 100644 +--- a/src/MainWindow.cpp ++++ b/src/MainWindow.cpp +@@ -102,7 +102,7 @@ MainWindow::MainWindow() : + + // create view manager + _viewManager = new ViewManager(this, actionCollection()); +- connect(_viewManager, &Konsole::ViewManager::empty, this, &Konsole::MainWindow::close); ++ connect(_viewManager, &Konsole::ViewManager::empty, this, &QWidget::close); + connect(_viewManager, &Konsole::ViewManager::activeViewChanged, this, + &Konsole::MainWindow::activeViewChanged); + connect(_viewManager, &Konsole::ViewManager::unplugController, this, +diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp +index 751684dc8..4d33a4cf8 100644 +--- a/src/ViewManager.cpp ++++ b/src/ViewManager.cpp +@@ -461,6 +461,13 @@ void ViewManager::sessionFinished() + return; + } + ++ // The last session/tab? emit empty() so that close() is called in ++ // MainWindow, fixes #432077 ++ if (_viewContainer->count() == 1) { ++ Q_EMIT empty(); ++ return; ++ } ++ + auto *session = qobject_cast<Session *>(sender()); + Q_ASSERT(session); + +-- +GitLab + 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 + |