1 |
commit: 1d44e1110d380df8df6b397520eecb201fea4d6a |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 30 12:17:00 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 30 12:58:20 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d44e111 |
7 |
|
8 |
kde-apps/konsole: Only emit empty() in SessionFinished() |
9 |
|
10 |
...when in TabbedNavigation mode. |
11 |
|
12 |
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=441206 |
13 |
Closes: https://bugs.gentoo.org/810598 |
14 |
Package-Manager: Portage-3.0.22, Repoman-3.0.3 |
15 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
16 |
|
17 |
...ionFinished-only-in-TabbedNavigation-mode.patch | 53 ++++++++++++++++++++++ |
18 |
...21.04.3-r2.ebuild => konsole-21.04.3-r3.ebuild} | 1 + |
19 |
...21.08.0-r4.ebuild => konsole-21.08.0-r5.ebuild} | 1 + |
20 |
3 files changed, 55 insertions(+) |
21 |
|
22 |
diff --git a/kde-apps/konsole/files/konsole-21.04.3-emit-empty-in-SessionFinished-only-in-TabbedNavigation-mode.patch b/kde-apps/konsole/files/konsole-21.04.3-emit-empty-in-SessionFinished-only-in-TabbedNavigation-mode.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..d02846ace5a |
25 |
--- /dev/null |
26 |
+++ b/kde-apps/konsole/files/konsole-21.04.3-emit-empty-in-SessionFinished-only-in-TabbedNavigation-mode.patch |
27 |
@@ -0,0 +1,53 @@ |
28 |
+From 2684bc7fa5ac0b740b3e8661c3a0ae0136fde0a7 Mon Sep 17 00:00:00 2001 |
29 |
+From: Ahmad Samir <a.samirh78@×××××.com> |
30 |
+Date: Sun, 22 Aug 2021 20:02:52 +0200 |
31 |
+Subject: [PATCH] Only emit empty() in SessionFinished() when in |
32 |
+ TabbedNavigation mode |
33 |
+ |
34 |
+empty() is emitted so that MainWindow calls close() and we get rid of the |
35 |
+colours-flashing bug when closing the last session/tab in a window, see |
36 |
+commit bbec72250d080. However all that isn't relevant when we are in |
37 |
+konsole Part mode, where there are no tabs or MainWindows. |
38 |
+ |
39 |
+This fixes a crash in Dolphin when closing its window while the embedded |
40 |
+Konsole Part is open. The crash would happen as calling |
41 |
+ViewContainer::currentTabViewCount() would end up in the ViewSplitter code |
42 |
+path, which is no-op in Konsole Part. |
43 |
+ |
44 |
+To test: |
45 |
+- Open dolphin, make sure the terminal panel isn't open to begin with |
46 |
+- open the terminal panel |
47 |
+- close the dolphin window while the terminal panel is open |
48 |
+ |
49 |
+BUG: 441206 |
50 |
+FIXED-IN: 21.08.1 |
51 |
+--- |
52 |
+ src/ViewManager.cpp | 12 +++++++----- |
53 |
+ 1 file changed, 7 insertions(+), 5 deletions(-) |
54 |
+ |
55 |
+diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp |
56 |
+index 92d2951fc..2ba77e9f0 100644 |
57 |
+--- a/src/ViewManager.cpp |
58 |
++++ b/src/ViewManager.cpp |
59 |
+@@ -494,11 +494,13 @@ void ViewManager::sessionFinished() |
60 |
+ return; |
61 |
+ } |
62 |
+ |
63 |
+- // The last session/tab, and only one view (no splits), emit empty() |
64 |
+- // so that close() is called in MainWindow, fixes #432077 |
65 |
+- if (_viewContainer->count() == 1 && _viewContainer->currentTabViewCount() == 1) { |
66 |
+- Q_EMIT empty(); |
67 |
+- return; |
68 |
++ if (_navigationMethod == TabbedNavigation) { |
69 |
++ // The last session/tab, and only one view (no splits), emit empty() |
70 |
++ // so that close() is called in MainWindow, fixes #432077 |
71 |
++ if (_viewContainer->count() == 1 && _viewContainer->currentTabViewCount() == 1) { |
72 |
++ Q_EMIT empty(); |
73 |
++ return; |
74 |
++ } |
75 |
+ } |
76 |
+ |
77 |
+ auto *session = qobject_cast<Session *>(sender()); |
78 |
+-- |
79 |
+GitLab |
80 |
+ |
81 |
|
82 |
diff --git a/kde-apps/konsole/konsole-21.04.3-r2.ebuild b/kde-apps/konsole/konsole-21.04.3-r3.ebuild |
83 |
similarity index 95% |
84 |
rename from kde-apps/konsole/konsole-21.04.3-r2.ebuild |
85 |
rename to kde-apps/konsole/konsole-21.04.3-r3.ebuild |
86 |
index c95192f968c..8ebbdcdf1dd 100644 |
87 |
--- a/kde-apps/konsole/konsole-21.04.3-r2.ebuild |
88 |
+++ b/kde-apps/konsole/konsole-21.04.3-r3.ebuild |
89 |
@@ -54,6 +54,7 @@ RDEPEND="${DEPEND}" |
90 |
PATCHES=( |
91 |
"${FILESDIR}/${P}-no-flash-on-session-close.patch" # bug 807933 |
92 |
"${FILESDIR}/${P}-dont-close-window-while-split.patch" # bug 808510 |
93 |
+ "${FILESDIR}/${P}-emit-empty-in-SessionFinished-only-in-TabbedNavigation-mode.patch" # bug 810598 |
94 |
) |
95 |
|
96 |
src_prepare() { |
97 |
|
98 |
diff --git a/kde-apps/konsole/konsole-21.08.0-r4.ebuild b/kde-apps/konsole/konsole-21.08.0-r5.ebuild |
99 |
similarity index 95% |
100 |
rename from kde-apps/konsole/konsole-21.08.0-r4.ebuild |
101 |
rename to kde-apps/konsole/konsole-21.08.0-r5.ebuild |
102 |
index d4600f096a8..22a1835a1ff 100644 |
103 |
--- a/kde-apps/konsole/konsole-21.08.0-r4.ebuild |
104 |
+++ b/kde-apps/konsole/konsole-21.08.0-r5.ebuild |
105 |
@@ -53,6 +53,7 @@ RDEPEND="${DEPEND}" |
106 |
PATCHES=( |
107 |
"${FILESDIR}/${PN}-21.04.3-no-flash-on-session-close.patch" # bug 807933 |
108 |
"${FILESDIR}/${PN}-21.04.3-dont-close-window-while-split.patch" # bug 808510 |
109 |
+ "${FILESDIR}/${PN}-21.04.3-emit-empty-in-SessionFinished-only-in-TabbedNavigation-mode.patch" # bug 810598 |
110 |
"${FILESDIR}/${P}-fix-crash-w-blur.patch" # bug 807905, fixed in 21.08.1 |
111 |
"${FILESDIR}/${P}-fix-KXmlGUI-toolbars-and-MainWindow-size.patch" # KDE-bugs 430036, 439339 |
112 |
"${FILESDIR}/${P}-fix-MainWindow-size-w-o-saved-size.patch" # KDE-bug 437791 |