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

Unified Diff: ash/wm/workspace/workspace_window_resizer.cc

Issue 19054013: Implement automatic layout and stacking for docked windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_233331_sized
Patch Set: Implement automatic layout and stacking (published a flag) Created 7 years, 5 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/wm/workspace/workspace_window_resizer.cc
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index 37daf19c9086f0ff39690ca93e0a34b2666a582c..ba1d2ef4c66b791b7323499981000ef1b61c0be2 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -110,7 +110,9 @@ const int kScreenEdgeInsetForTouchResize = 32;
// Returns true if the window should stick to the edge.
bool ShouldStickToEdge(int distance_from_edge, int sticky_size) {
if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshEnableStickyEdges)) {
+ switches::kAshEnableStickyEdges) ||
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshEnableDockedWindows)) {
return distance_from_edge < 0 &&
distance_from_edge > -sticky_size;
}
@@ -351,8 +353,11 @@ void WorkspaceWindowResizer::Drag(const gfx::Point& location_in_parent,
int sticky_size;
if (event_flags & ui::EF_CONTROL_DOWN) {
sticky_size = 0;
- } else if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshEnableStickyEdges)) {
+ } else if (
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshEnableStickyEdges) ||
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshEnableDockedWindows)) {
sticky_size = kStickyDistancePixels;
} else if ((details_.bounds_change & kBoundsChange_Resizes) &&
details_.source == aura::client::WINDOW_MOVE_SOURCE_TOUCH) {

Powered by Google App Engine
This is Rietveld 408576698