Selecting or not selecting the newly opened tab never worked, since the "select"
field was added to the NEW_WINDOW_REQUESTED message, and not passed on to the internal NEW_TAB message. Fixed this, and also added a check for the tertiary mouse button for regular navigation actions. This means clicking links with the middle mouse button opens in a background tab regard less if it would have opened a new page when clicked with the primary button. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@199 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
parent
c516096e8e
commit
ce869c629b
@ -408,6 +408,7 @@ void LauncherWindow::MenusBeginning()
|
||||
|
||||
void LauncherWindow::newTab(const BString& url, bool select)
|
||||
{
|
||||
printf("newTab(%s, %d)\n", url.String(), select);
|
||||
// Executed in app thread (new BWebPage needs to be created in app thread).
|
||||
BWebView* webView = new BWebView("web_view");
|
||||
webView->WebPage()->SetDownloadListener(m_downloadListener);
|
||||
@ -435,7 +436,7 @@ void LauncherWindow::NavigationRequested(const BString& url, BWebView* view)
|
||||
{
|
||||
}
|
||||
|
||||
void LauncherWindow::NewWindowRequested(const BString& url)
|
||||
void LauncherWindow::NewWindowRequested(const BString& url, bool primaryAction)
|
||||
{
|
||||
// Always open new windows in the application thread, since
|
||||
// creating a BWebView will try to grab the application lock.
|
||||
@ -445,7 +446,7 @@ void LauncherWindow::NewWindowRequested(const BString& url)
|
||||
BMessage message(NEW_TAB);
|
||||
message.AddPointer("window", this);
|
||||
message.AddString("url", url);
|
||||
message.AddBool("select", false);
|
||||
message.AddBool("select", primaryAction);
|
||||
be_app->PostMessage(&message);
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
private:
|
||||
// WebPage notification API implementations
|
||||
virtual void NavigationRequested(const BString& url, BWebView* view);
|
||||
virtual void NewWindowRequested(const BString& url);
|
||||
virtual void NewWindowRequested(const BString& url, bool primaryAction);
|
||||
virtual void LoadNegotiating(const BString& url, BWebView* view);
|
||||
virtual void LoadCommited(const BString& url, BWebView* view);
|
||||
virtual void LoadProgress(float progress, BWebView* view);
|
||||
|
Loading…
Reference in New Issue
Block a user