diff options
Diffstat (limited to 'src/application.cpp')
-rw-r--r-- | src/application.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/application.cpp b/src/application.cpp index a09fc26e..e868116d 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -183,7 +183,7 @@ int Application::newInstance() // 2) Are there arguments? // 3) Is rekonq recovering from crash? // so, we have 8 possible cases... - bool isFirstLoad = m_mainWindows.isEmpty(); + static bool isFirstLoad = true; bool areThereArguments = (args->count() > 0); bool isRekonqCrashed = (ReKonfig::recoverOnCrash() > 0); // note that isRekonqCrashed is always true if it is not the first load @@ -195,6 +195,13 @@ int Application::newInstance() int exitValue = 1 * isFirstLoad + 2 * areThereArguments + 4 * isRekonqCrashed; + if (isFirstLoad && isSessionRestored()) + { + isFirstLoad = false; + + return exitValue; + } + if (isRekonqCrashed && isFirstLoad) { loadUrl(KUrl("about:closedTabs"), Rekonq::NewWindow); @@ -312,6 +319,8 @@ int Application::newInstance() } KStartupInfo::appStarted(); + isFirstLoad = false; + return exitValue; } |