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

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 (rebase) 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
« no previous file with comments | « ash/ash_switches.cc ('k') | ash/root_window_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..39af272d36e04e1addedc2eef91f578031532d55 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_DockedContainer)
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698