Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(836)

Unified Diff: chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm

Issue 12430013: Fix panel showing logic when Chrome enters the fullscreen mode (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()) {
+ // 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 {

Powered by Google App Engine
This is Rietveld 408576698