[konsole] [Bug 367447] Having one konsole window open at logout opens two at next login

John Stanley via KDE Bugzilla bugzilla_noreply at kde.org
Sat Aug 27 05:56:04 UTC 2016


https://bugs.kde.org/show_bug.cgi?id=367447

John Stanley <jpsinthemix at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jpsinthemix at gmail.com

--- Comment #6 from John Stanley <jpsinthemix at gmail.com> ---
This bug is due to'konsoleApp.newInstance() being called always, even when
session Restoration is in effect. As a workaround, I've patched as follows:

--- konsole-16.08.0.old/src/main.cpp    2016-08-09 19:01:34.000000000 -0400
+++ konsole-16.08.0.new/src/main.cpp    2016-08-25 20:58:20.973978896 -0400
@@ -158,15 +158,13 @@ extern "C" int Q_DECL_EXPORT kdemain(int
     // of Konsole is started.
     QObject::connect(&dbusService, &KDBusService::activateRequested,
&konsoleApp, &Application::slotActivateRequested);

-    if (!konsoleApp.newInstance()) {
+    if (app->isSessionRestored())
+        restoreSession(konsoleApp);
+    else if (!konsoleApp.newInstance()) {
         // An argument that printed something and mean we should just quit was
passed.
         delete app;
         return 0;
     }
-
-    if (app->isSessionRestored())
-        restoreSession(konsoleApp);
-
     // Since we've allocated the QApplication on the heap for the KDBusService
workaround,
     // we need to delete it manually before returning from main().
     int ret = app->exec();

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list