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 65ed116b24261cf04babe85e815197cb5f5eaba8..82f9464d97a59e41d3a301eab270d62a400a3e39 100644 |
--- a/ash/wm/workspace/workspace_layout_manager.cc |
+++ b/ash/wm/workspace/workspace_layout_manager.cc |
@@ -24,6 +24,7 @@ |
#include "ui/aura/window_observer.h" |
#include "ui/base/events/event.h" |
#include "ui/base/ui_base_types.h" |
+#include "ui/compositor/scoped_animation_duration_scale_mode.h" |
#include "ui/views/corewm/window_util.h" |
using aura::Window; |
@@ -170,6 +171,22 @@ void WorkspaceLayoutManager::OnDisplayWorkAreaInsetsChanged() { |
void WorkspaceLayoutManager::OnWindowPropertyChanged(Window* window, |
const void* key, |
intptr_t old) { |
+ if (key == ash::internal::kWindowPersistsAcrossAllWorkspacesKey && |
sky
2013/05/01 04:32:04
I don't think you intended to keep this.
Mr4D (OOO till 08-26)
2013/05/01 17:57:23
Ahh. No problem. Removed and reverted back to what
|
+ ash::Shell::IsForcedMaximizeMode()) { |
+ // Since this flag can only be set after creation, but it is not dynamic, |
+ // we want this flag to be executed immediately without animations. |
+ scoped_ptr<ui::ScopedAnimationDurationScaleMode> animation_duration( |
+ new ui::ScopedAnimationDurationScaleMode( |
+ ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); |
+ if (GetPersistsAcrossAllWorkspaces(window)) { |
+ if (wm::IsWindowMaximized(window)) |
+ wm::RestoreWindow(window); |
+ } else { |
+ if (!wm::IsWindowMaximized(window)) |
+ wm::MaximizeWindow(window); |
+ } |
+ } |
+ |
if (key == aura::client::kShowStateKey) { |
ui::WindowShowState old_state = static_cast<ui::WindowShowState>(old); |
ui::WindowShowState new_state = |