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

Unified Diff: ash/display/screen_position_controller.cc

Issue 13896026: Stick windows to sides of workspaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dock with zero width (no logs) Created 7 years, 6 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
Index: ash/display/screen_position_controller.cc
diff --git a/ash/display/screen_position_controller.cc b/ash/display/screen_position_controller.cc
index ef2d2518d05f3a1ac957c438bf42434161175951..ffd3f1900d78701a830a7835407cf7807de49e8e 100644
--- a/ash/display/screen_position_controller.cc
+++ b/ash/display/screen_position_controller.cc
@@ -162,6 +162,10 @@ void ScreenPositionController::SetBounds(aura::Window* window,
aura::Window* dst_container = NULL;
if (dst_root != window->GetRootWindow()) {
int container_id = window->parent()->id();
+ // Dragging a docked window to another root window should show it floating
+ // rather than docked in another screen's dock.
+ if (container_id == kShellWindowId_DockContainer)
+ container_id = kShellWindowId_WorkspaceContainer;
// All containers that uses screen coordinates must have valid window ids.
DCHECK_GE(container_id, 0);
// Don't move modal background.
« no previous file with comments | « ash/ash_switches.cc ('k') | ash/root_window_controller.h » ('j') | ash/shell_window_ids.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698