From 99a742867c9364e2cd54de408652465bd38b42ca Mon Sep 17 00:00:00 2001 From: Lars Doelle Date: Mon, 4 Sep 2000 23:40:30 +0000 Subject: [PATCH] Fixed Ctrl-D possibly closes many sessions. svn path=/trunk/kdebase/konsole/; revision=62694 --- ChangeLog | 1 + src/konsole.C | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4dd62cd1..8770e6b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 4 Sep 2000 - made Shift-(Left|Right) to change sessions - restored session selection on tool bar +- fixed Ctrl-D being propagated to other sessions. 28 Aug 2000 - fullscreen mode adjusted to qt-2.1 2 Jul 2000 diff --git a/src/konsole.C b/src/konsole.C index dc5fb933..ed9e447c 100644 --- a/src/konsole.C +++ b/src/konsole.C @@ -1019,17 +1019,25 @@ void Konsole::doneSession(TESession* s, int ) // to get messed up in rare cases. The following causes delete not to // be called from within the signal handler. - QTimer::singleShot(100,s,SLOT(terminate())); + QTimer::singleShot(1,s,SLOT(terminate())); if (s == se) { // pick a new session - se = NULL; - // QIntDictIterator it( no2session ); - QPtrDictIterator it( session2action); - if ( it.current() ) { - it.current()->setChecked(true); - activateSession(); - } else + se = sessions.first(); + if ( se ) + { + session2action.find(se)->setChecked(true); + //FIXME: this Timer stupidity originated from the connected + // design of Emulations. By this the newly activated + // session might get a Ctrl(D) if the session has be + // terminated by this keypress. A likely problem + // can be found in the CMD_prev/nextSession processing. + // Since the timer approach only works at good weather, + // the whole construction is not suited to what it + // should do. Affected is the TEEmulation::setConnect. + QTimer::singleShot(1,this,SLOT(activateSession())); + } + else kapp->quit(); } }