| 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 70a3533f04fdf709ffba1ea70e1efa9ee5765b4f..7359fe62964685a90a9217c2013b52c949d05b27 100644
|
| --- a/ui/views/cocoa/native_widget_mac_nswindow.mm
|
| +++ b/ui/views/cocoa/native_widget_mac_nswindow.mm
|
| @@ -123,26 +123,12 @@
|
| [[self contentView] keyUp:event];
|
| }
|
|
|
| -// Override display, since this is the first opportunity Cocoa gives to detect
|
| -// a visibility change in some cases. For example, restoring from the dock first
|
| -// calls -[NSWindow display] before any NSWindowDelegate functions and before
|
| -// ordering the window (and without actually calling -[NSWindow deminiaturize]).
|
| -// By notifying the delegate that a display is about to occur, it can apply a
|
| -// correct visibility state, before [super display] requests a draw of the
|
| -// contentView. -[NSWindow isVisible] can still report NO at this point, so this
|
| -// gives the delegate time to apply correct visibility before the draw occurs.
|
| -- (void)display {
|
| - [[self viewsNSWindowDelegate] onWindowWillDisplay];
|
| - [super display];
|
| -}
|
| -
|
| // Override window order functions to intercept other visibility changes. This
|
| // is needed in addition to the -[NSWindow display] override because Cocoa
|
| // hardly ever calls display, and reports -[NSWindow isVisible] incorrectly
|
| // when ordering in a window for the first time.
|
| - (void)orderWindow:(NSWindowOrderingMode)orderingMode
|
| relativeTo:(NSInteger)otherWindowNumber {
|
| - [[self viewsNSWindowDelegate] onWindowOrderWillChange:orderingMode];
|
| [super orderWindow:orderingMode relativeTo:otherWindowNumber];
|
| [[self viewsNSWindowDelegate] onWindowOrderChanged:nil];
|
| }
|
|
|