Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5b11fd59 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Prevent 2 windows from opening upon session restore

Session management would start 2 konsole windows upon login.

Thanks John Stanley (jpsinthemix gmail com) for patch

BUG: 367447
parent 392ee33c
......@@ -158,7 +158,9 @@ extern "C" int Q_DECL_EXPORT kdemain(int argc, char* argv[])
// of Konsole is started.
QObject::connect(&dbusService, &KDBusService::activateRequested, &konsoleApp, &Application::slotActivateRequested);
if (!konsoleApp.newInstance()) {
if (app->isSessionRestored()) {
restoreSession(konsoleApp);
} else if (!konsoleApp.newInstance()) {
// Do not finish starting Konsole
// 1. An argument was given to just printed info
// 2. An invalid situation ocurred
......@@ -166,9 +168,6 @@ extern "C" int Q_DECL_EXPORT kdemain(int argc, char* argv[])
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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment