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..ca77a896d0c2d90416c81c86bbe16692a33bbd25 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,20 @@ void AddTrackedWindows(aura::Window* root, |
windows->insert(windows->end(), children.begin(), children.end()); |
} |
+// Adds dragged windows that are children of the docked container during the |
+// drag to |windows|. |
oshima
2014/01/08 01:33:03
// Adds windows being dragged in the docked contai
varkha
2014/01/09 05:14:20
Done.
|
+void AddDraggedWindows(aura::Window* root, |
+ MruWindowTracker::WindowList* windows) { |
+ aura::Window* container = Shell::GetContainer( |
+ root, internal::kShellWindowId_DockedContainer); |
+ const MruWindowTracker::WindowList& children(container->children()); |
oshima
2014/01/08 01:33:03
nit: I prefer = instead of ()
varkha
2014/01/09 05:14:20
Done.
|
+ 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 +88,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( |