Index: ash/wm/workspace/workspace_layout_manager.cc |
diff --git a/ash/wm/workspace/workspace_layout_manager.cc b/ash/wm/workspace/workspace_layout_manager.cc |
index 4e79c6e83d114f84213addf40e982c06bb4bbf6b..d717cdcde544b98ce815aa46130a4eed4a73951b 100644 |
--- a/ash/wm/workspace/workspace_layout_manager.cc |
+++ b/ash/wm/workspace/workspace_layout_manager.cc |
@@ -218,7 +218,6 @@ void WorkspaceLayoutManager::OnWindowPropertyChanged(Window* window, |
void WorkspaceLayoutManager::OnWindowStackingChanged(aura::Window* window) { |
UpdateShelfVisibility(); |
- UpdateFullscreenState(); |
oshima
2014/02/14 20:09:30
I think this one should stay here. Technically it'
flackr
2014/02/14 20:15:01
Correct, but this calls OnWindowRemovedFromLayout
|
} |
void WorkspaceLayoutManager::OnWindowDestroying(aura::Window* window) { |
@@ -247,6 +246,7 @@ void WorkspaceLayoutManager::OnWindowActivated(aura::Window* gained_active, |
window_state->Unminimize(); |
DCHECK(!window_state->IsMinimized()); |
} |
+ UpdateFullscreenState(); |
oshima
2014/02/14 17:24:26
All layout managers are notified for activation ch
flackr
2014/02/14 20:00:02
Yes, since it's a ShellObserver notification, that
|
} |
////////////////////////////////////////////////////////////////////////////// |
@@ -425,8 +425,16 @@ void WorkspaceLayoutManager::UpdateShelfVisibility() { |
} |
void WorkspaceLayoutManager::UpdateFullscreenState() { |
- bool is_fullscreen = GetRootWindowController( |
- window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL; |
+ const aura::Window* fullscreen_window = GetRootWindowController( |
+ window_->GetRootWindow())->GetWindowForFullscreenMode(); |
+ // TODO(flackr): The fullscreen state is currently tracked per workspace |
+ // but the shell notification implies a per root window state. Currently |
+ // only windows in the default workspace container will go fullscreen so |
+ // this should correctly track the root window fullscreen state but this |
+ // should really be tracked by the RootWindowController since technically |
+ // any container could get a fullscreen window. |
+ bool is_fullscreen = fullscreen_window && |
+ window_->Contains(fullscreen_window); |
if (is_fullscreen != is_fullscreen_) { |
ash::Shell::GetInstance()->NotifyFullscreenStateChange( |
is_fullscreen, window_->GetRootWindow()); |