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

Unified Diff: ash/wm/drag_window_resizer.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/wm/drag_window_resizer.cc
diff --git a/ash/wm/drag_window_resizer.cc b/ash/wm/drag_window_resizer.cc
index d0f977551f78c0d7c99e0247683d36bb54067c6e..57dd6f4d1bbb61d4be33c833d227eeed757b6659 100644
--- a/ash/wm/drag_window_resizer.cc
+++ b/ash/wm/drag_window_resizer.cc
@@ -4,12 +4,15 @@
#include "ash/wm/drag_window_resizer.h"
+#include "ash/ash_switches.h"
#include "ash/display/mouse_cursor_event_filter.h"
#include "ash/screen_ash.h"
#include "ash/shell.h"
#include "ash/wm/coordinate_conversion.h"
+#include "ash/wm/dock/dock_layout_manager.h"
#include "ash/wm/drag_window_controller.h"
#include "ash/wm/property_util.h"
+#include "base/command_line.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
@@ -112,6 +115,11 @@ void DragWindowResizer::CompleteDrag(int event_flags) {
GetTarget()->bounds());
GetTarget()->SetBoundsInScreen(dst_bounds, dst_display);
}
+ if ((details_.bounds_change & WindowResizer::kBoundsChange_Repositions) &&
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshEnableDockedWindows)) {
+ SetDockEdge(GetTarget(), DockLayoutManager::FindDockEdge(GetTarget()));
+ }
}
void DragWindowResizer::RevertDrag() {

Powered by Google App Engine
This is Rietveld 408576698