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

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 Created 6 years, 12 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 | no next file » | 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..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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698