Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Side by Side Diff: ash/wm/workspace_controller.cc

Issue 100903002: Ignore fullscreen windows which are behind other windows for fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add multi-monitor test. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 (*i == windows.back() && window_state->IsFullscreen()) {
flackr 2013/12/03 22:05:55 Hang on, this check for topmost doesn't seem to be
78 // Only enter the full screen state if the topmost window is fullscreen.
78 return WORKSPACE_WINDOW_STATE_FULL_SCREEN; 79 return WORKSPACE_WINDOW_STATE_FULL_SCREEN;
79 } 80 }
80 if (!window_overlaps_launcher && (*i)->bounds().Intersects(shelf_bounds)) 81 if (!window_overlaps_launcher && (*i)->bounds().Intersects(shelf_bounds))
81 window_overlaps_launcher = true; 82 window_overlaps_launcher = true;
82 } 83 }
83 if (has_maximized_window) 84 if (has_maximized_window)
84 return WORKSPACE_WINDOW_STATE_MAXIMIZED; 85 return WORKSPACE_WINDOW_STATE_MAXIMIZED;
85 86
86 return window_overlaps_launcher ? 87 return window_overlaps_launcher ?
87 WORKSPACE_WINDOW_STATE_WINDOW_OVERLAPS_SHELF : 88 WORKSPACE_WINDOW_STATE_WINDOW_OVERLAPS_SHELF :
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 settings.SetTweenType(gfx::Tween::EASE_OUT); 120 settings.SetTweenType(gfx::Tween::EASE_OUT);
120 settings.SetTransitionDuration( 121 settings.SetTransitionDuration(
121 base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS)); 122 base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS));
122 viewport_->layer()->SetTransform(gfx::Transform()); 123 viewport_->layer()->SetTransform(gfx::Transform());
123 viewport_->layer()->SetOpacity(1.0f); 124 viewport_->layer()->SetOpacity(1.0f);
124 } 125 }
125 } 126 }
126 127
127 } // namespace internal 128 } // namespace internal
128 } // namespace ash 129 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698