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

Unified Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 9692016: Revert 120593 - Ensure the previously active browser window gets the focus after a browser window i… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_cocoa.mm
===================================================================
--- chrome/browser/ui/cocoa/browser_window_cocoa.mm (revision 126246)
+++ chrome/browser/ui/cocoa/browser_window_cocoa.mm (working copy)
@@ -154,10 +154,20 @@
// If there is an overlay window, we contain a tab being dragged between
// windows. Don't hide the window as it makes the UI extra confused. We can
// still close the window, as that will happen when the drag completes.
- if ([controller_ overlayWindow])
+ if ([controller_ overlayWindow]) {
[controller_ deferPerformClose];
- else
+ } else {
+ // Make sure we hide the window immediately. Even though performClose:
+ // calls orderOut: eventually, it leaves the window on-screen long enough
+ // that we start to see tabs shutting down. http://crbug.com/23959
+ // TODO(viettrungluu): This is kind of bad, since |-performClose:| calls
+ // |-windowShouldClose:| (on its delegate, which is probably the
+ // controller) which may return |NO| causing the window to not be closed,
+ // thereby leaving a hidden window. In fact, our window-closing procedure
+ // involves a (indirect) recursion on |-performClose:|, which is also bad.
+ [window() orderOut:controller_];
[window() performClose:controller_];
+ }
}
void BrowserWindowCocoa::Activate() {
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698