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

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

Issue 68033003: Undocks window first before side-snapping bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undocks window first before side-snapping bounds (comments) Created 7 years, 1 month 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 3617da52255642d59fae53fbb811d881222546b1..dd2992e9017e5ed42a933c9c03b77d45debfd4cc 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -436,6 +436,7 @@ void WorkspaceWindowResizer::CompleteDrag(int event_flags) {
if (!did_move_or_resize_ || details_.window_component != HTCAPTION)
return;
+ bool is_snapped = false;
pkotwicz 2013/11/27 20:24:43 Can you renamed to |snapped| ? I THINK that it is
varkha 2013/11/28 01:09:37 Done.
// When the window is not in the normal show state, we do not snap the window.
// This happens when the user minimizes or maximizes the window by keyboard
// shortcut while dragging it. If the window is the result of dragging a tab
@@ -458,8 +459,11 @@ void WorkspaceWindowResizer::CompleteDrag(int event_flags) {
if (window_state()->CanResize() &&
!dock_layout_->is_dragged_window_docked()) {
snap_sizer_->SnapWindowToTargetBounds();
+ is_snapped = true;
}
}
+ if (window_state()->IsSnapped() && !is_snapped)
+ window_state()->Restore();
}
void WorkspaceWindowResizer::RevertDrag() {

Powered by Google App Engine
This is Rietveld 408576698