<table><tr><td style="">EspadaV8 added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D16482">View Revision</a></tr></table><br /><div><div><p>Didn't realise that the summary here would become part of the git commit so moving the text into a comment</p>

<hr class="remarkup-hr" />

<p>I have only recently found out about <tt style="background: #ebebeb; font-size: 13px;">--background-mode</tt> while looking into a alternative to Yakuake (due to its issue with panel focusing on show/hide and not respecting the 'open in current folder' option).</p>

<p>Background mode in Konsole works well for me, but there are times when I close the last view (either by mistake or just because I want to 'start fresh'). Currently Konsole will close in this case and then need relaunching.</p>

<p>This PR adds an option call <tt style="background: #ebebeb; font-size: 13px;">PersistAfterLastClose</tt> (if you can think of something nicer to call it I'm happy to change it). When this setting is <tt style="background: #ebebeb; font-size: 13px;">true</tt>, instead of calling <tt style="background: #ebebeb; font-size: 13px;">MainWindow::close</tt> the new method <tt style="background: #ebebeb; font-size: 13px;">MainWindow::handleLastTabClosed</tt> is called which checks this setting and will instead instantly create a new session and hide the window (which is what Yakuake will do).</p>

<p>This is my first bit of KDE work and it has been a while since I've done any Qt/C++ so please let me know if anything needs changing.</p></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D16482">https://phabricator.kde.org/D16482</a></div></div><br /><div><strong>To: </strong>EspadaV8, Konsole<br /><strong>Cc: </strong>konsole-devel, Konsole, ngraham, maximilianocuria, hindenburg<br /></div>