Chromium Code Reviews| Index: chrome/browser/ui/panels/panel_window_controller_cocoa.mm |
| diff --git a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm |
| index 94bc08263a2c9e62b3fce1fc87477545279afa91..230dfd40d202e4ee30f5f9c33cdbbcb51f7c66c5 100644 |
| --- a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm |
| +++ b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm |
| @@ -1019,6 +1019,10 @@ enum { |
| - (void)fullScreenModeChanged:(bool)isFullScreen { |
| [self updateWindowLevel]; |
| + if (isFullScreen) |
|
Dmitry Titov
2012/04/12 00:08:51
Lets add a comment on why this is necessary, it's
jianli
2012/04/12 00:45:17
Done.
|
| + [[self window] orderBack]; |
| + else |
| + [[self window] orderFront]; |
| } |
| - (BOOL)canBecomeKeyWindow { |
| @@ -1042,8 +1046,9 @@ enum { |
| if (![self isWindowLoaded]) |
| return; |
| // Make sure we don't draw on top of a window in full screen mode. |
| - if (windowShim_->panel()->manager()->is_full_screen() || |
| - !windowShim_->panel()->always_on_top()) { |
| + Panel* panel = windowShim_->panel(); |
| + if (panel->manager()->display_settings_provider()->is_full_screen() || |
| + !panel->always_on_top()) { |
| [[self window] setLevel:NSNormalWindowLevel]; |
| return; |
| } |
| @@ -1062,7 +1067,7 @@ enum { |
| // While this is OK for expanded panels, it makes minimized panels impossible |
| // to activate. As a result, we still use NSStatusWindowLevel for minimized |
| // panels, since it's impossible to compose IME text in them anyway. |
| - if (windowShim_->panel()->IsMinimized()) { |
| + if (panel->IsMinimized()) { |
| [[self window] setLevel:NSStatusWindowLevel]; |
| return; |
| } |