WebPositive: Restore previous window only if archive has at least one tab

Fixes #19994

Change-Id: I91ea0b11f2c820599e45f962b2271ea7dbf8cca0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10646
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
nipos
2026-05-05 16:26:42 +00:00
committed by waddlesplash
parent c31c485eee
commit f849a8775e
+2 -1
View File
@@ -271,7 +271,7 @@ BrowserApp::ReadyToRun()
uint32 workspaces = B_CURRENT_WORKSPACE; uint32 workspaces = B_CURRENT_WORKSPACE;
archivedWindow.FindUInt32("window workspaces", 0, &workspaces); archivedWindow.FindUInt32("window workspaces", 0, &workspaces);
BString url; BString url;
archivedWindow.FindString("tab", 0, &url); if (archivedWindow.FindString("tab", 0, &url) == B_OK) {
BrowserWindow* window = new(std::nothrow) BrowserWindow(frame, fSettings, url, BrowserWindow* window = new(std::nothrow) BrowserWindow(frame, fSettings, url,
fContext, INTERFACE_ELEMENT_ALL, NULL, workspaces); fContext, INTERFACE_ELEMENT_ALL, NULL, workspaces);
@@ -289,6 +289,7 @@ BrowserApp::ReadyToRun()
} }
} }
} }
}
// If there is fLauchRefs message, // If there is fLauchRefs message,
if (fLaunchRefsMessage != NULL) { if (fLaunchRefsMessage != NULL) {
_RefsReceived(fLaunchRefsMessage, &pagesCreated, &fullscreen); _RefsReceived(fLaunchRefsMessage, &pagesCreated, &fullscreen);