public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
Date: Tue, 24 Aug 2021 13:39:17 +0000 (UTC)	[thread overview]
Message-ID: <1629812238.6e8bd8fe46daf2e09b95c3abdeab0e2ad4ce6845.asturm@gentoo> (raw)

commit:     6e8bd8fe46daf2e09b95c3abdeab0e2ad4ce6845
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 24 12:20:34 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Aug 24 13:37:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e8bd8fe

kde-apps/konsole: Don't close the whole window if there are splits

Closes: https://bugs.gentoo.org/808510
Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...ole-21.04.3-dont-close-window-while-split.patch | 76 ++++++++++++++++++++++
 ...21.04.3-r1.ebuild => konsole-21.04.3-r2.ebuild} |  5 +-
 ...21.08.0-r3.ebuild => konsole-21.08.0-r4.ebuild} |  1 +
 3 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/kde-apps/konsole/files/konsole-21.04.3-dont-close-window-while-split.patch b/kde-apps/konsole/files/konsole-21.04.3-dont-close-window-while-split.patch
new file mode 100644
index 00000000000..20762b10957
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-21.04.3-dont-close-window-while-split.patch
@@ -0,0 +1,76 @@
+From 2591a9489a4d3a43c7a7f00764e9f84822d4946c Mon Sep 17 00:00:00 2001
+From: Ahmad Samir <a.samirh78@gmail.com>
+Date: Sun, 15 Aug 2021 15:51:33 +0200
+Subject: [PATCH] When closing a session, don't close the whole window if there
+ are splits
+
+When closing a session, we check if that is the last tab, and make the code
+close the whole window, but we also need to make sure it's the last view,
+i.e. no split views.
+
+CCBUG: 440976
+FIXED-IN: 21.08.1
+(cherry picked from commit 4a3cab03f5d853f4dd48531979fc3fb57dde5e2e)
+---
+ src/ViewManager.cpp           | 6 +++---
+ src/widgets/ViewContainer.cpp | 9 +++++++++
+ src/widgets/ViewContainer.h   | 6 ++++++
+ 3 files changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp
+index 9c006e2bd..426040b78 100644
+--- a/src/ViewManager.cpp
++++ b/src/ViewManager.cpp
+@@ -494,9 +494,9 @@ void ViewManager::sessionFinished()
+         return;
+     }
+ 
+-    // The last session/tab? emit empty() so that close() is called in
+-    // MainWindow, fixes #432077
+-    if (_viewContainer->count() == 1) {
++    // The last session/tab, and only one view (no splits), emit empty()
++    // so that close() is called in MainWindow, fixes #432077
++    if (_viewContainer->count() == 1 && _viewContainer->currentTabViewCount() == 1) {
+         Q_EMIT empty();
+         return;
+     }
+diff --git a/src/widgets/ViewContainer.cpp b/src/widgets/ViewContainer.cpp
+index 2d7bfd13b..b25c00cdd 100644
+--- a/src/widgets/ViewContainer.cpp
++++ b/src/widgets/ViewContainer.cpp
+@@ -145,6 +145,15 @@ ViewSplitter *TabbedViewContainer::viewSplitterAt(int index)
+     return qobject_cast<ViewSplitter*>(widget(index));
+ }
+ 
++int TabbedViewContainer::currentTabViewCount()
++{
++    if (auto *splitter = activeViewSplitter()) {
++        return splitter->findChildren<TerminalDisplay*>().count();
++    }
++
++    return 1;
++}
++
+ void TabbedViewContainer::moveTabToWindow(int index, QWidget *window)
+ {
+     auto splitter = viewSplitterAt(index);
+diff --git a/src/widgets/ViewContainer.h b/src/widgets/ViewContainer.h
+index 3cbacf2cf..8e0a0986a 100644
+--- a/src/widgets/ViewContainer.h
++++ b/src/widgets/ViewContainer.h
+@@ -135,6 +135,12 @@ public:
+      */
+     ViewSplitter *viewSplitterAt(int index);
+ 
++    /**
++     * Returns the number of split views (i.e. TerminalDisplay widgets)
++     * in this tab; if there are no split views, 1 is returned.
++     */
++    int currentTabViewCount();
++
+     void connectTerminalDisplay(TerminalDisplay *display);
+     void disconnectTerminalDisplay(TerminalDisplay *display);
+     void moveTabLeft();
+-- 
+GitLab
+

diff --git a/kde-apps/konsole/konsole-21.04.3-r1.ebuild b/kde-apps/konsole/konsole-21.04.3-r2.ebuild
similarity index 92%
rename from kde-apps/konsole/konsole-21.04.3-r1.ebuild
rename to kde-apps/konsole/konsole-21.04.3-r2.ebuild
index 42e9362243d..c95192f968c 100644
--- a/kde-apps/konsole/konsole-21.04.3-r1.ebuild
+++ b/kde-apps/konsole/konsole-21.04.3-r2.ebuild
@@ -51,7 +51,10 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
-PATCHES=( "${FILESDIR}/${P}-no-flash-on-session-close.patch" ) # bug 807933
+PATCHES=(
+	"${FILESDIR}/${P}-no-flash-on-session-close.patch" # bug 807933
+	"${FILESDIR}/${P}-dont-close-window-while-split.patch" # bug 808510
+)
 
 src_prepare() {
 	ecm_src_prepare

diff --git a/kde-apps/konsole/konsole-21.08.0-r3.ebuild b/kde-apps/konsole/konsole-21.08.0-r4.ebuild
similarity index 96%
rename from kde-apps/konsole/konsole-21.08.0-r3.ebuild
rename to kde-apps/konsole/konsole-21.08.0-r4.ebuild
index fe8cab4b97f..d4600f096a8 100644
--- a/kde-apps/konsole/konsole-21.08.0-r3.ebuild
+++ b/kde-apps/konsole/konsole-21.08.0-r4.ebuild
@@ -52,6 +52,7 @@ RDEPEND="${DEPEND}"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-21.04.3-no-flash-on-session-close.patch" # bug 807933
+	"${FILESDIR}/${PN}-21.04.3-dont-close-window-while-split.patch" # bug 808510
 	"${FILESDIR}/${P}-fix-crash-w-blur.patch" # bug 807905, fixed in 21.08.1
 	"${FILESDIR}/${P}-fix-KXmlGUI-toolbars-and-MainWindow-size.patch" # KDE-bugs 430036, 439339
 	"${FILESDIR}/${P}-fix-MainWindow-size-w-o-saved-size.patch" # KDE-bug 437791


             reply	other threads:[~2021-08-24 13:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 13:39 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-06-26 20:18 [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/ Sam James
2021-09-22 21:59 Andreas Sturmlechner
2021-08-15 19:11 Andreas Sturmlechner
2021-08-13 20:14 Andreas Sturmlechner
2021-05-01 21:24 Andreas Sturmlechner
2020-05-28 20:20 Andreas Sturmlechner
2020-03-23 23:57 Andreas Sturmlechner
2018-12-23  1:25 Andreas Sturmlechner
2018-02-08  0:10 Andreas Sturmlechner
2017-04-25 12:47 Michael Palimaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1629812238.6e8bd8fe46daf2e09b95c3abdeab0e2ad4ce6845.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox