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

Unified Diff: ash/wm/mru_window_tracker.cc

Issue 23591049: Do not show auto-hidden shelf when dragging a window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_275801
Patch Set: Do not show auto-hidden shelf when dragging a window (test) Created 6 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/wm/workspace_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/mru_window_tracker.cc
diff --git a/ash/wm/mru_window_tracker.cc b/ash/wm/mru_window_tracker.cc
index 4ed9a1df7230add4d26cfe61e7f7828bd220b76a..fc942cb414a5c11af78cc04a6cb4782b69f13e1f 100644
--- a/ash/wm/mru_window_tracker.cc
+++ b/ash/wm/mru_window_tracker.cc
@@ -10,6 +10,7 @@
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/window_cycle_list.h"
+#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
#include "ash/wm/workspace_controller.h"
#include "ui/aura/client/activation_client.h"
@@ -31,6 +32,19 @@ void AddTrackedWindows(aura::Window* root,
windows->insert(windows->end(), children.begin(), children.end());
}
+// Adds windows being dragged in the docked container to |windows| list.
+void AddDraggedWindows(aura::Window* root,
+ MruWindowTracker::WindowList* windows) {
+ aura::Window* container = Shell::GetContainer(
+ root, internal::kShellWindowId_DockedContainer);
+ const MruWindowTracker::WindowList& children = container->children();
+ for (MruWindowTracker::WindowList::const_iterator iter = children.begin();
+ iter != children.end(); ++iter) {
+ if (wm::GetWindowState(*iter)->is_dragged())
+ windows->insert(windows->end(), *iter);
+ }
+}
+
// Returns true if |window| is a container whose windows can be cycled to.
bool IsSwitchableContainer(aura::Window* window) {
if (!window)
@@ -73,6 +87,10 @@ MruWindowTracker::WindowList BuildWindowListInternal(
for (size_t i = 0; i < kSwitchableWindowContainerIdsLength; ++i)
AddTrackedWindows(active_root, kSwitchableWindowContainerIds[i], &windows);
+ // Dragged windows are temporarily parented in docked container. Include them
+ // in the in tracked list.
+ AddDraggedWindows(active_root, &windows);
+
// Removes unfocusable windows.
MruWindowTracker::WindowList::iterator last =
std::remove_if(
« no previous file with comments | « no previous file | ash/wm/workspace_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698