diff options
author | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-23 23:39:16 +0000 |
---|---|---|
committer | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-23 23:39:16 +0000 |
commit | 5afebbd81e7b0a2d72b0e37caf7ac35575a5150d (patch) | |
tree | 31f8c8dd80f62c0bed85ed590134e5e697f3f159 | |
parent | 56241dd679345c5fedf93b60032bf9b3a055709d (diff) | |
download | chromium_src-5afebbd81e7b0a2d72b0e37caf7ac35575a5150d.zip chromium_src-5afebbd81e7b0a2d72b0e37caf7ac35575a5150d.tar.gz chromium_src-5afebbd81e7b0a2d72b0e37caf7ac35575a5150d.tar.bz2 |
[Mac] Fix "Chrome windows use more 'hidden' space on Exposé/Mission Control".
BUG=81969
TEST=Open http://www.google.com. Make the window small. Mouse over one
of the links on the bar at the top of the page. Then move the mouse up
out of the window. Now, bring up Exposé. The Chrome window should not
have extra blue space around in Exposé when highlighted.
Review URL: http://codereview.chromium.org/10185005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133565 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/cocoa/status_bubble_mac.mm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac.mm b/chrome/browser/ui/cocoa/status_bubble_mac.mm index 4f86f88..69d865d 100644 --- a/chrome/browser/ui/cocoa/status_bubble_mac.mm +++ b/chrome/browser/ui/cocoa/status_bubble_mac.mm @@ -447,8 +447,18 @@ void StatusBubbleMac::SetState(StatusBubbleState state) { 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]; |