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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 23737003: Mac: Fix window raising for multiple desktops (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Manually switch spaces for app shims Created 7 years, 3 months 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
Index: chrome/browser/app_controller_mac.mm
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 214a6d59791ef4d5c8beae59537e234ed3177636..017ae089047210984b33cc3355a2180f754503a3 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -1069,20 +1069,20 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
// Bring all browser windows to the front. Specifically, this brings them in
// front of any app windows. FocusWindowSet will also unminimize the most
// recently minimized window if no windows in the set are visible.
- // If there are tabbed or popup windows, return here. Otherwise, the windows
- // are panels or notifications so we still need to open a new window.
+ // If there are any, return here. Otherwise, the windows are panels or
+ // notifications so we still need to open a new window.
if (hasVisibleWindows) {
- BOOL foundBrowser = NO;
std::set<NSWindow*> browserWindows;
for (chrome::BrowserIterator iter; !iter.done(); iter.Next()) {
Browser* browser = *iter;
browserWindows.insert(browser->window()->GetNativeWindow());
- if (browser->is_type_tabbed() || browser->is_type_popup())
- foundBrowser = YES;
}
- ui::FocusWindowSet(browserWindows);
- if (foundBrowser)
- return YES;
+ if (!browserWindows.empty()) {
+ ui::FocusWindowSet(browserWindows, false);
+ // Return NO; we've done the unminimize, so AppKit shouldn't do
+ // anything.
+ return NO;
+ }
}
// If launched as a hidden login item (due to installation of a persistent app

Powered by Google App Engine
This is Rietveld 408576698