Chromium Code Reviews| Index: ash/wm/workspace/workspace_event_filter.cc |
| diff --git a/ash/wm/workspace/workspace_event_filter.cc b/ash/wm/workspace/workspace_event_filter.cc |
| index 0865beb3ac71fc97019414a507e0f8c7cfcdd841..6c9538b4dc7c32a23b4e773cd7653287febab896 100644 |
| --- a/ash/wm/workspace/workspace_event_filter.cc |
| +++ b/ash/wm/workspace/workspace_event_filter.cc |
| @@ -37,11 +37,17 @@ void SingleAxisUnmaximize(aura::Window* window, |
| window->ClearProperty(aura::client::kRestoreBoundsKey); |
| } |
| +} // namespace |
| + |
| void ToggleMaximizedState(aura::Window* window) { |
| if (GetRestoreBoundsInScreen(window)) { |
| - if (window->GetProperty(aura::client::kShowStateKey) == |
| - ui::SHOW_STATE_NORMAL) { |
| - window->SetBounds(GetRestoreBoundsInParent(window)); |
| + if (ash::wm::IsWindowNormal(window)) { |
| + // The only way this can happen is that we are in left/right maximized |
|
sky
2012/08/28 15:38:36
I don't understand this if. If there are restore b
|
| + // state and need to really maximize. |
| + gfx::Rect restore_bounds = *GetRestoreBoundsInScreen(window); |
| + window->SetProperty(aura::client::kShowStateKey, |
| + ui::SHOW_STATE_MAXIMIZED); |
| + SetRestoreBoundsInScreen(window, restore_bounds); |
| } else { |
| window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
| } |
| @@ -50,8 +56,6 @@ void ToggleMaximizedState(aura::Window* window) { |
| } |
| } |
| -} // namespace |
| - |
| namespace internal { |
| WorkspaceEventFilter::WorkspaceEventFilter(aura::Window* owner) |