WebPositive: dont restore session if a ref is received

Signed-off-by: Adrien Destugues <[email protected]>
Fixes #12850
This commit is contained in:
Paradoxon
2016-07-10 22:53:10 +02:00
committed by Adrien Destugues
parent ac30c58648
commit 8ba07614a4
+4 -1
View File
@@ -231,10 +231,11 @@ BrowserApp::ReadyToRun()
fLaunchRefsMessage = NULL;
}
// If no refs led to a new open page, restore previous session.
if (pagesCreated == 0) {
BMessage archivedWindow;
for (int i = 0; fSession->FindMessage("window", i, &archivedWindow) == B_OK;
i++) {
BRect frame = archivedWindow.FindRect("window frame");
BString url;
archivedWindow.FindString("tab", 0, &url);
@@ -253,7 +254,9 @@ BrowserApp::ReadyToRun()
}
}
}
}
// If previous session did not contain any window, create a new empty one.
if (pagesCreated == 0)
_CreateNewWindow("", fullscreen);