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_controller.h" | 5 #include "ash/wm/workspace_controller.h" |
6 | 6 |
7 #include "ash/shelf/shelf_layout_manager.h" | 7 #include "ash/shelf/shelf_layout_manager.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/base_layout_manager.h" | 10 #include "ash/wm/base_layout_manager.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 wm::WindowState* window_state = wm::GetWindowState(*i); | 67 wm::WindowState* window_state = wm::GetWindowState(*i); |
68 if (window_state->ignored_by_shelf()) | 68 if (window_state->ignored_by_shelf()) |
69 continue; | 69 continue; |
70 ui::Layer* layer = (*i)->layer(); | 70 ui::Layer* layer = (*i)->layer(); |
71 if (!layer->GetTargetVisibility() || layer->GetTargetOpacity() == 0.0f) | 71 if (!layer->GetTargetVisibility() || layer->GetTargetOpacity() == 0.0f) |
72 continue; | 72 continue; |
73 if (window_state->IsMaximized()) { | 73 if (window_state->IsMaximized()) { |
74 // An untracked window may still be fullscreen so we keep iterating when | 74 // An untracked window may still be fullscreen so we keep iterating when |
75 // we hit a maximized window. | 75 // we hit a maximized window. |
76 has_maximized_window = true; | 76 has_maximized_window = true; |
77 } else if (window_state->IsFullscreen()) { | 77 } else if (window_state->IsFullscreen() && window_state->IsActive()) { |
oshima
2013/12/03 19:17:52
Don't we have to check if this is top most?
Windo
flackr
2013/12/03 21:32:58
Good point, done. This also no longer requires act
| |
78 return WORKSPACE_WINDOW_STATE_FULL_SCREEN; | 78 return WORKSPACE_WINDOW_STATE_FULL_SCREEN; |
79 } | 79 } |
80 if (!window_overlaps_launcher && (*i)->bounds().Intersects(shelf_bounds)) | 80 if (!window_overlaps_launcher && (*i)->bounds().Intersects(shelf_bounds)) |
81 window_overlaps_launcher = true; | 81 window_overlaps_launcher = true; |
82 } | 82 } |
83 if (has_maximized_window) | 83 if (has_maximized_window) |
84 return WORKSPACE_WINDOW_STATE_MAXIMIZED; | 84 return WORKSPACE_WINDOW_STATE_MAXIMIZED; |
85 | 85 |
86 return window_overlaps_launcher ? | 86 return window_overlaps_launcher ? |
87 WORKSPACE_WINDOW_STATE_WINDOW_OVERLAPS_SHELF : | 87 WORKSPACE_WINDOW_STATE_WINDOW_OVERLAPS_SHELF : |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 settings.SetTweenType(gfx::Tween::EASE_OUT); | 119 settings.SetTweenType(gfx::Tween::EASE_OUT); |
120 settings.SetTransitionDuration( | 120 settings.SetTransitionDuration( |
121 base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS)); | 121 base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS)); |
122 viewport_->layer()->SetTransform(gfx::Transform()); | 122 viewport_->layer()->SetTransform(gfx::Transform()); |
123 viewport_->layer()->SetOpacity(1.0f); | 123 viewport_->layer()->SetOpacity(1.0f); |
124 } | 124 } |
125 } | 125 } |
126 | 126 |
127 } // namespace internal | 127 } // namespace internal |
128 } // namespace ash | 128 } // namespace ash |
OLD | NEW |