| Index: ui/views/cocoa/native_widget_mac_nswindow.mm
|
| diff --git a/ui/views/cocoa/native_widget_mac_nswindow.mm b/ui/views/cocoa/native_widget_mac_nswindow.mm
|
| index 678e4d58440a13fb33614e264dc17c22c36afed9..321c2f3dea8d80e83bb6a27e08b5866645c185fd 100644
|
| --- a/ui/views/cocoa/native_widget_mac_nswindow.mm
|
| +++ b/ui/views/cocoa/native_widget_mac_nswindow.mm
|
| @@ -83,9 +83,16 @@
|
| if (![self delegate])
|
| return NO;
|
|
|
| - // Dialogs shouldn't take large shadows away from their parent window.
|
| + // Dialogs and bubbles shouldn't take large shadows away from their parent.
|
| views::Widget* widget = [self viewsWidget];
|
| - return widget->CanActivate() && !widget->IsDialogBox();
|
| + return widget->CanActivate() && ![self parentWindow];
|
| +}
|
| +
|
| +// Lets the traffic light buttons on the parent window keep their active state.
|
| +- (BOOL)_sharesParentKeyState {
|
| + // Follow -canBecomeMainWindow unless the window provides its own buttons.
|
| + return ([self styleMask] & NSClosableWindowMask) == 0 &&
|
| + ![self canBecomeMainWindow];
|
| }
|
|
|
| // Override sendEvent to allow key events to be forwarded to a toolkit-views
|
|
|