Index: ash/wm/overview/window_selector_controller.cc |
diff --git a/ash/wm/overview/window_selector_controller.cc b/ash/wm/overview/window_selector_controller.cc |
index 19b12afa06e2f89129af09eaab586d73ce6e2144..3d86325c8c13e9cf5c645f54f5e43766098a8a34 100644 |
--- a/ash/wm/overview/window_selector_controller.cc |
+++ b/ash/wm/overview/window_selector_controller.cc |
@@ -12,6 +12,7 @@ |
#include "ash/wm/mru_window_tracker.h" |
#include "ash/wm/overview/window_selector.h" |
#include "ash/wm/screen_pinning_controller.h" |
+#include "ash/wm/splitview/split_view_controller.h" |
#include "ash/wm/window_state.h" |
#include "base/metrics/histogram_macros.h" |
@@ -54,9 +55,26 @@ bool WindowSelectorController::ToggleOverview() { |
std::not1(std::ptr_fun(&WindowSelector::IsSelectable))); |
windows.resize(end - windows.begin()); |
- // Don't enter overview mode with no windows. |
- if (windows.empty()) |
- return false; |
+ if (!Shell::Get()->IsSplitViewModeActive()) { |
+ // Don't enter overview with no window if the split view mode is inactive. |
+ if (windows.empty()) |
+ return false; |
+ } else { |
+ // Don't enter overview with less than 1 window if the split view mode is |
+ // active. |
+ if (windows.size() <= 1) |
+ return false; |
+ |
+ // Remove the default snapped window from the window list. The default |
+ // snapped window occupy one side of the screen, while the other windows |
+ // occupy the other side of the screen in overview mode. |
oshima
2017/06/14 05:45:47
can you also mention where the default window will
xdai1
2017/06/15 22:11:42
Done.
|
+ aura::Window* default_snapped_window = |
+ Shell::Get()->split_view_controller()->GetDefaultSnappedWindow(); |
+ auto iter = |
+ std::find(windows.begin(), windows.end(), default_snapped_window); |
+ DCHECK(iter != windows.end()); |
oshima
2017/06/14 00:19:27
DCHECK_NE
xdai1
2017/06/15 22:11:42
DCHECK_NE could not be used to compare two iterato
|
+ windows.erase(iter); |
+ } |
Shell::Get()->NotifyOverviewModeStarting(); |
window_selector_.reset(new WindowSelector(this)); |