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

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

Issue 10185005: [Mac] Fix "Chrome windows use more 'hidden' space on Exposé/Mission Control". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/status_bubble_mac.mm
===================================================================
--- chrome/browser/ui/cocoa/status_bubble_mac.mm (revision 133437)
+++ chrome/browser/ui/cocoa/status_bubble_mac.mm (working copy)
@@ -447,8 +447,18 @@
if (state == state_)
return;
- if (state == kBubbleHidden)
- [window_ setFrame:NSMakeRect(0, 0, 1, 1) display:YES];
+ if (state == kBubbleHidden) {
+ // When hidden (with alpha of 0), make the window have the minimum size,
+ // while still keeping the same origin. It's important to not set the
+ // origin to 0,0 as that will cause the window to use more space in
+ // Expose/Mission Control. See http://crbug.com/81969.
+ //
+ // Also, doing it this way instead of detaching the window avoids bugs with
+ // Spaces and Cmd-`. See http://crbug.com/31821 and http://crbug.com/61629.
+ NSRect frame = [window_ frame];
+ frame.size = NSMakeSize(1, 1);
+ [window_ setFrame:frame display:YES];
+ }
if ([delegate_ respondsToSelector:@selector(statusBubbleWillEnterState:)])
[delegate_ statusBubbleWillEnterState:state];
« 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