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

Unified Diff: ash/wm/dock/docked_window_resizer.cc

Issue 141053002: Avoids updating dock alignment when drag is cancelled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoids updating dock alignment when drag is cancelled (comments) Created 6 years, 11 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/wm/dock/docked_window_resizer.h ('k') | ash/wm/dock/docked_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_resizer.cc
diff --git a/ash/wm/dock/docked_window_resizer.cc b/ash/wm/dock/docked_window_resizer.cc
index 3ee18ded4af53398b07f25228bbe018960b66c8b..f3e4561faa8fdef711feb7718adc8513603b6b9e 100644
--- a/ash/wm/dock/docked_window_resizer.cc
+++ b/ash/wm/dock/docked_window_resizer.cc
@@ -113,7 +113,7 @@ void DockedWindowResizer::Drag(const gfx::Point& location, int event_flags) {
void DockedWindowResizer::CompleteDrag() {
// The root window can change when dragging into a different screen.
next_window_resizer_->CompleteDrag();
- FinishedDragging();
+ FinishedDragging(aura::client::MOVE_SUCCESSFUL);
}
void DockedWindowResizer::RevertDrag() {
@@ -126,7 +126,7 @@ void DockedWindowResizer::RevertDrag() {
else
dock_layout_->UndockDraggedWindow();
}
- FinishedDragging();
+ FinishedDragging(aura::client::MOVE_CANCELED);
}
DockedWindowResizer::DockedWindowResizer(WindowResizer* next_window_resizer,
@@ -213,7 +213,8 @@ void DockedWindowResizer::StartedDragging() {
dock_layout_->DockDraggedWindow(GetTarget());
}
-void DockedWindowResizer::FinishedDragging() {
+void DockedWindowResizer::FinishedDragging(
+ aura::client::WindowMoveResult move_result) {
if (!did_move_or_resize_)
return;
did_move_or_resize_ = false;
@@ -245,7 +246,7 @@ void DockedWindowResizer::FinishedDragging() {
DockedAction action = MaybeReparentWindowOnDragCompletion(is_resized,
is_attached_panel);
dock_layout_->FinishDragging(
- action,
+ move_result == aura::client::MOVE_CANCELED ? DOCKED_ACTION_NONE : action,
details().source == aura::client::WINDOW_MOVE_SOURCE_MOUSE ?
DOCKED_ACTION_SOURCE_MOUSE : DOCKED_ACTION_SOURCE_TOUCH);
« no previous file with comments | « ash/wm/dock/docked_window_resizer.h ('k') | ash/wm/dock/docked_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698