Commit 70c08204 authored by thakis@chromium.org's avatar thakis@chromium.org

mac: Window buttons should keep "active" view when bubbles / tabpose are open on 10.7

This matches the behavior of NSPopover.

This is done by overriding the SPI _sharesParentKeyState, which works on 10.7 but
not on 10.6. If we want to get this right on 10.6, we could use the SPI described
in http://code.google.com/p/chromium/issues/detail?id=44087#c42 , but since we
didn't feel we need this until now, we can probably live with this being 10.7-only.

I do need this functionality for the history-swipe-overlay.

BUG=none
TEST=Click e.g. bookmark star. Bookmark bubble should appear, browser window close
button should still look active.


Review URL: http://codereview.chromium.org/7585013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95708 0039d316-1c4b-4281-b951-d872f2087c98
parent b373edf0
......@@ -139,6 +139,12 @@ class AppNotificationBridge : public NotificationObserver {
return YES;
}
// Lets the traffic light buttons on the browser window keep their "active"
// state while an info bubble is open. Only has an effect on 10.7.
- (BOOL)_sharesParentKeyState {
return YES;
}
- (void)close {
// Block the window from receiving events while it fades out.
closing_ = YES;
......
......@@ -1196,6 +1196,12 @@ void AnimateCALayerOpacityFromTo(
return YES;
}
// Lets the traffic light buttons on the browser window keep their "active"
// state while an info bubble is open. Only has an effect on 10.7.
- (BOOL)_sharesParentKeyState {
return YES;
}
// Handle key events that should be executed repeatedly while the key is down.
- (void)keyDown:(NSEvent*)event {
if (state_ == tabpose::kFadingOut)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment