WebPositive: dont restore session if a ref is received
Signed-off-by: Adrien Destugues <[email protected]> Fixes #12850
This commit is contained in:
committed by
Adrien Destugues
parent
ac30c58648
commit
8ba07614a4
@@ -231,10 +231,11 @@ BrowserApp::ReadyToRun()
|
|||||||
fLaunchRefsMessage = NULL;
|
fLaunchRefsMessage = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If no refs led to a new open page, restore previous session.
|
||||||
|
if (pagesCreated == 0) {
|
||||||
BMessage archivedWindow;
|
BMessage archivedWindow;
|
||||||
for (int i = 0; fSession->FindMessage("window", i, &archivedWindow) == B_OK;
|
for (int i = 0; fSession->FindMessage("window", i, &archivedWindow) == B_OK;
|
||||||
i++) {
|
i++) {
|
||||||
|
|
||||||
BRect frame = archivedWindow.FindRect("window frame");
|
BRect frame = archivedWindow.FindRect("window frame");
|
||||||
BString url;
|
BString url;
|
||||||
archivedWindow.FindString("tab", 0, &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)
|
if (pagesCreated == 0)
|
||||||
_CreateNewWindow("", fullscreen);
|
_CreateNewWindow("", fullscreen);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user