- // Create the new tab and return the privacy WebEngine view pointer. It will then be populated with the link from the context menu.
- return browserWindowPointer->tabWidgetPointer->addTab();
+ // Create the new tab and return the privacy WebEngine view pointer. `true` removes the focus from the blank URL line edit.
+ // The new privacy WebEngine view pointer is returned so it can be populated with the link from the context menu.
+ return browserWindowPointer->tabWidgetPointer->addTab(true);
+ }
+
+ case QWebEnginePage::WebBrowserWindow: {
+ // Create a new browser window.
+ BrowserWindow *newBrowserWindowPointer = new BrowserWindow();
+
+ // Show the new browser window.
+ newBrowserWindowPointer->show();
+
+ // The new privacy WebEngine view pointer is returned so it can be populated with the link from the context menu.
+ return newBrowserWindowPointer->tabWidgetPointer->loadBlankInitialWebsite();