summaryrefslogtreecommitdiffstats
path: root/ash/wm/window_positioner.cc
diff options
context:
space:
mode:
authorafakhry <afakhry@chromium.org>2015-01-12 09:57:43 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-12 17:58:37 +0000
commitcae0618f6fff0122063d231ff3217788707eaaaf (patch)
tree4cd4b1e8d4ea309bda96a78bb1f8c9a7b1d8f11c /ash/wm/window_positioner.cc
parent7a5b2859441e471e1ac8c459d997918af8e8cd0f (diff)
downloadchromium_src-cae0618f6fff0122063d231ff3217788707eaaaf.zip
chromium_src-cae0618f6fff0122063d231ff3217788707eaaaf.tar.gz
chromium_src-cae0618f6fff0122063d231ff3217788707eaaaf.tar.bz2
System modal dialog unhide shelf launcher, and prevents going into maximized mode.
When shelf is auto hidden, displaying a system modal dialog used to unhide it. That was because the ShelfLayoutManager when updating the shelf visibility, it used to ask the MruWindowTracker to build a list of the windows. This list used to exclude the unfocusable windows (due to the system modal dialog), So the returned list used to be empty which means the shelf should be unhidden. We actually need the list of all visible windows regardless of their focusability. Two unit tests has been written to validate the correct behavior in both single and dual display modes. BUG=277893, 447720 TEST=ash_unittests --gtest_filter=ShelfLayoutManagerTest.ShelfWithSystemModalWindowSingleDisplay, ShelfLayoutManagerTest.ShelfWithSystemModalWindowDualDisplay, MaximizeModeWindowManagerTest.GoingToMaximizedWithModalDialogPresent Review URL: https://codereview.chromium.org/780113002 Cr-Commit-Position: refs/heads/master@{#311063}
Diffstat (limited to 'ash/wm/window_positioner.cc')
-rw-r--r--ash/wm/window_positioner.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/ash/wm/window_positioner.cc b/ash/wm/window_positioner.cc
index 880abd1..4e80ed8 100644
--- a/ash/wm/window_positioner.cc
+++ b/ash/wm/window_positioner.cc
@@ -191,8 +191,8 @@ aura::Window* GetReferenceWindow(const aura::Window* root_window,
active = NULL;
// Get a list of all windows.
- const std::vector<aura::Window*> windows =
- ash::MruWindowTracker::BuildWindowList();
+ const std::vector<aura::Window*> windows = ash::Shell::GetInstance()->
+ mru_window_tracker()->BuildWindowListIgnoreModal();
if (windows.empty())
return NULL;
@@ -503,8 +503,8 @@ gfx::Rect WindowPositioner::SmartPopupPosition(
const gfx::Rect& old_pos,
const gfx::Rect& work_area,
int grid) {
- const std::vector<aura::Window*> windows =
- MruWindowTracker::BuildWindowList();
+ const std::vector<aura::Window*> windows = ash::Shell::GetInstance()->
+ mru_window_tracker()->BuildWindowListIgnoreModal();
std::vector<const gfx::Rect*> regions;
// Process the window list and check if we can bail immediately.