Chromium Code Reviews| Index: chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm |
| diff --git a/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm |
| index f28d1a71bdbfd124d5649925b56c35faf508ebb4..efccc3daec3060ea823ddfd14b5516c09f361aaf 100644 |
| --- a/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm |
| +++ b/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm |
| @@ -849,13 +849,17 @@ NSCursor* LoadWebKitCursor(WebKit::WebCursorInfo::Type type) { |
| - (void)fullScreenModeChanged:(bool)isFullScreen { |
| [self updateWindowLevel]; |
| - // The full-screen window is in normal level and changing the panel window to |
| - // same normal level will not move it below the full-screen window. Thus we |
| - // need to reorder the panel window. |
| - if (isFullScreen) |
| - [[self window] orderBack:nil]; |
| - else |
| - [[self window] orderFrontRegardless]; |
| + // If the panel is not always on top, its z-order should not be affected if |
| + // some other window enters fullscreen mode. |
| + if (windowShim_->panel()->IsAlwaysOnTop()) { |
|
Dmitry Titov
2013/03/14 01:10:25
early return?
jianli
2013/03/14 19:11:48
Done.
|
| + // The full-screen window is in normal level and changing the panel window |
| + // to same normal level will not move it below the full-screen window. Thus |
| + // we need to reorder the panel window. |
| + if (isFullScreen) |
| + [[self window] orderBack:nil]; |
| + else |
| + [[self window] orderFrontRegardless]; |
| + } |
| } |
| - (BOOL)canBecomeKeyWindow { |