OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/workspace/workspace_manager.h" | 5 #include "ash/wm/workspace/workspace_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
144 return WORKSPACE_WINDOW_STATE_DEFAULT; | 144 return WORKSPACE_WINDOW_STATE_DEFAULT; |
145 | 145 |
146 // TODO: this code needs to be made multi-display aware. | 146 // TODO: this code needs to be made multi-display aware. |
147 gfx::Rect shelf_bounds(shelf_->GetIdealBounds()); | 147 gfx::Rect shelf_bounds(shelf_->GetIdealBounds()); |
148 const aura::Window::Windows& windows(contents_view_->children()); | 148 const aura::Window::Windows& windows(contents_view_->children()); |
149 bool window_overlaps_launcher = false; | 149 bool window_overlaps_launcher = false; |
150 bool has_maximized_window = false; | 150 bool has_maximized_window = false; |
151 for (aura::Window::Windows::const_iterator i = windows.begin(); | 151 for (aura::Window::Windows::const_iterator i = windows.begin(); |
152 i != windows.end(); ++i) { | 152 i != windows.end(); ++i) { |
153 ui::Layer* layer = (*i)->layer(); | 153 ui::Layer* layer = (*i)->layer(); |
154 if (!layer->GetTargetVisibility() || layer->GetTargetOpacity() == 0.0f) | 154 if (!layer->GetTargetVisibility() || layer->GetTargetOpacity() == 0.0f || |
155 wm::IsWindowMinimized(*i)) | |
sky
2012/08/07 23:11:18
minimized windows should be hidden. So, I'm not su
Mr4D (OOO till 08-26)
2012/08/08 01:02:28
If the window is maximized and is transformed dire
sky
2012/08/08 04:39:16
The target visibility should be 0. Do you have a t
Mr4D (OOO till 08-26)
2012/08/08 14:26:46
I debugged it and here is what I see:
GetLayerTar
| |
155 continue; | 156 continue; |
156 if (wm::IsWindowMaximized(*i)) { | 157 if (wm::IsWindowMaximized(*i)) { |
157 // An untracked window may still be fullscreen so we keep iterating when | 158 // An untracked window may still be fullscreen so we keep iterating when |
158 // we hit a maximized window. | 159 // we hit a maximized window. |
159 has_maximized_window = true; | 160 has_maximized_window = true; |
160 } else if (wm::IsWindowFullscreen(*i)) { | 161 } else if (wm::IsWindowFullscreen(*i)) { |
161 return WORKSPACE_WINDOW_STATE_FULL_SCREEN; | 162 return WORKSPACE_WINDOW_STATE_FULL_SCREEN; |
162 } | 163 } |
163 if (!window_overlaps_launcher && (*i)->bounds().Intersects(shelf_bounds)) | 164 if (!window_overlaps_launcher && (*i)->bounds().Intersects(shelf_bounds)) |
164 window_overlaps_launcher = true; | 165 window_overlaps_launcher = true; |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
348 return workspace; | 349 return workspace; |
349 } | 350 } |
350 | 351 |
351 void WorkspaceManager::CleanupWorkspace(Workspace* workspace) { | 352 void WorkspaceManager::CleanupWorkspace(Workspace* workspace) { |
352 if (workspace->type() != Workspace::TYPE_MANAGED && workspace->is_empty()) | 353 if (workspace->type() != Workspace::TYPE_MANAGED && workspace->is_empty()) |
353 delete workspace; | 354 delete workspace; |
354 } | 355 } |
355 | 356 |
356 } // namespace internal | 357 } // namespace internal |
357 } // namespace ash | 358 } // namespace ash |
OLD | NEW |