From 6d9387446962660835431fdf3b94d04884c49700 Mon Sep 17 00:00:00 2001 From: stippi Date: Tue, 13 Apr 2010 23:15:23 +0000 Subject: [PATCH] * Add a flag "activate" to WindowFeatures and set it to true by default. It's supposed to allow specifying whether the new window/page shall be activated or not. * In ContextMenuController, when creating a new page from a link, specify that it shall not be activated. * Handle the new flag in the WebKit layer. -> "Open link in tab" from the context menu no longer selects the new tab, but opens it "in the background". git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@414 94f232f2-1747-11df-bad5-a5bfde151594 --- src/apps/webpositive/BrowserWindow.cpp | 4 ++-- src/apps/webpositive/BrowserWindow.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp index 5c8beb644e..ac030f2f9d 100644 --- a/src/apps/webpositive/BrowserWindow.cpp +++ b/src/apps/webpositive/BrowserWindow.cpp @@ -810,14 +810,14 @@ BrowserWindow::NewWindowRequested(const BString& url, bool primaryAction) void BrowserWindow::NewPageCreated(BWebView* view, BRect windowFrame, - bool modalDialog, bool resizable) + bool modalDialog, bool resizable, bool activate) { if (windowFrame.IsValid()) { BrowserWindow* window = new BrowserWindow(windowFrame, fAppSettings, DoNotHaveToolbar, view); window->Show(); } else - CreateNewTab(BString(), true, view); + CreateNewTab(BString(), activate, view); } diff --git a/src/apps/webpositive/BrowserWindow.h b/src/apps/webpositive/BrowserWindow.h index c6c91a88c9..124144cffb 100644 --- a/src/apps/webpositive/BrowserWindow.h +++ b/src/apps/webpositive/BrowserWindow.h @@ -94,7 +94,7 @@ private: virtual void CloseWindowRequested(BWebView* view); virtual void NewPageCreated(BWebView* view, BRect windowFrame, bool modalDialog, - bool resizable); + bool resizable, bool activate); virtual void LoadNegotiating(const BString& url, BWebView* view); virtual void LoadCommitted(const BString& url,