Bug 301458 - Konsole ask if it should close sessions on logout
Summary: Konsole ask if it should close sessions on logout
Alias: None
Product: konsole
Classification: Unclassified
Component: general (show other bugs)
Version: 2.8.999
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Konsole Developer
Keywords: regression
Depends on:
Reported: 2012-06-08 16:30 UTC by Rolf Eike Beer
Modified: 2012-06-18 12:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.0


Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Eike Beer 2012-06-08 16:30:22 UTC
Since I upgraded to 4.9b1 Konsole asks if I log out the session if it should close the sessions. This is annoying and did not happen in 4.8.3.

Reproducible: Always
Comment 1 Jekyll Wu 2012-06-08 17:12:37 UTC
Your observation is correct.  However, that is the side effect of another fix.  See bug 127194 and  https://projects.kde.org/projects/kde/kde-baseapps/konsole/repository/revisions/3309e5b12280b27a6e632f9c5e43a38f8f0791bf.

Here is the related change: 

 bool MainWindow::queryClose()
-    if (kapp->sessionSaving() ||
-            _viewManager->viewProperties().count() < 2)
+    // TODO: Ideally, we should check what process is running instead
+    //       of just how many sessions are running.
+    // If only 1 session is running, don't ask user to confirm close.
+    if (_viewManager->viewProperties().count() < 2)
         return true;

@Kurt, I think we need to re-evaulate that change based upon this report and bug 127194.  Is there some way to distinguish  between power-off and log-out ? 

I'm currently inclined to revert the change, since "logging out with konsole open " is a common use case. The confirmation dialog is annoying during log-out, and if users choose  "do not ask me again", they also disable the confirmation for closing konsole window with multiple tabs.

Another "solution" might be we use two different confirmation dialogs(and thus two different config entries within konsolerc) for the two different situation:

   1.  power-off or log-out( when kapp->sessionSaving() is true )
   2.  closing konsole window 

That makes the annoyance just one click , and users won't lose the protection for closing konsole window accidentally.  But that might be overkill and would introduce new option/UI/strings.
Comment 2 Rolf Eike Beer 2012-06-08 17:35:21 UTC
I also had the effect that konsole showed up on all virtual desktops of the 
given activity when I logged in again. But I'll retest if that is not a side 
effect of the confirmation question.
Comment 3 Kurt Hindenburg 2012-06-09 12:48:51 UTC
Well it is one or the other; if we want to keep the KDE 4.8 way for now that's fine /w me.
If you revert, put in a TODO or something so for 4.10 we can really fix this.
Comment 4 Jekyll Wu 2012-06-09 22:16:02 UTC
Git commit 1ab2fc1b20885a9b82f6c5ca3f3c28876ec849f9 by Jekyll Wu.
Committed on 09/06/2012 at 23:40.
Pushed by jekyllwu into branch 'master'.

Do not ask for confirmation of closing when logging out.

This effectively reverts the change which was made to ask for
confirmation when powering off. That issue needs to be reworked in
next feature release, but for now just revert it since the current
implementation should cause more annoyance than benefit.
Related: bug 127194
FIXED-IN: 4.9.0

M  +8    -0    src/MainWindow.cpp