Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(983)

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2596763003: On macOS, avoid forcible activation during Show.
Patch Set: Reword comment. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index e34983dae09a4faf5753142b2ef8d19836919241..de9da11bdd2ac711af3d2671ba4a1b554c6605aa 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -606,7 +606,15 @@ void BrowserView::Show() {
// If the window is already visible, just activate it.
if (frame_->IsVisible()) {
+#if defined(OS_MACOSX)
+ // When opening a URL from another application, macOS will activate the
+ // browser window in the case when "Open" action is used, but won't do it
+ // in the case when "Open Behind" is requested. Let's assume macOS handles
+ // the activation for us; just put the window above other browser windows.
+ frame_->ShowInactive();
+#else
frame_->Activate();
+#endif
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698