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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/workspace/workspace_window_resizer.h" 5 #include "ash/wm/workspace/workspace_window_resizer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 UpdateSnapPhantomWindow(location_in_parent, bounds); 424 UpdateSnapPhantomWindow(location_in_parent, bounds);
425 } else { 425 } else {
426 snap_type_ = SNAP_NONE; 426 snap_type_ = SNAP_NONE;
427 snap_phantom_window_controller_.reset(); 427 snap_phantom_window_controller_.reset();
428 snap_sizer_.reset(); 428 snap_sizer_.reset();
429 SetDraggedWindowDocked(false); 429 SetDraggedWindowDocked(false);
430 } 430 }
431 } 431 }
432 432
433 void WorkspaceWindowResizer::CompleteDrag(int event_flags) { 433 void WorkspaceWindowResizer::CompleteDrag(int event_flags) {
434 window_state()->set_bounds_changed_by_user(true); 434 window_state()->SetBoundsChangedByUser(true);
435 snap_phantom_window_controller_.reset(); 435 snap_phantom_window_controller_.reset();
436 if (!did_move_or_resize_ || details_.window_component != HTCAPTION) 436 if (!did_move_or_resize_ || details_.window_component != HTCAPTION)
437 return; 437 return;
438 438
439 // When the window is not in the normal show state, we do not snap the window. 439 // When the window is not in the normal show state, we do not snap the window.
440 // This happens when the user minimizes or maximizes the window by keyboard 440 // This happens when the user minimizes or maximizes the window by keyboard
441 // shortcut while dragging it. If the window is the result of dragging a tab 441 // shortcut while dragging it. If the window is the result of dragging a tab
442 // out of a maximized window, it's already in the normal show state when this 442 // out of a maximized window, it's already in the normal show state when this
443 // is called, so it does not matter. 443 // is called, so it does not matter.
444 if (window_state()->IsNormalShowState() && 444 if (window_state()->IsNormalShowState() &&
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 if (!dock_layout_->is_dragged_window_docked()) 1031 if (!dock_layout_->is_dragged_window_docked())
1032 dock_layout_->DockDraggedWindow(window()); 1032 dock_layout_->DockDraggedWindow(window());
1033 } else { 1033 } else {
1034 if (dock_layout_->is_dragged_window_docked()) 1034 if (dock_layout_->is_dragged_window_docked())
1035 dock_layout_->UndockDraggedWindow(); 1035 dock_layout_->UndockDraggedWindow();
1036 } 1036 }
1037 } 1037 }
1038 1038
1039 } // namespace internal 1039 } // namespace internal
1040 } // namespace ash 1040 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698