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

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

Issue 10918077: Adding proper dragging behavior for L/R maximized windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed first set of comments Created 8 years, 3 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
« ash/wm/window_resizer.cc ('K') | « ash/wm/workspace/frame_maximize_button.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d8755bcac24408b90142bc3aef6cc4f550532994..e6f795a7a4e8ecda828b9cfa19b2574dfe6e5a3a 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -124,8 +124,11 @@ void WorkspaceWindowResizer::Drag(const gfx::Point& location, int event_flags) {
if (wm::IsWindowNormal(window()))
AdjustBoundsForMainWindow(&bounds, grid_size);
if (bounds != window()->bounds()) {
- if (!did_move_or_resize_)
+ if (!did_move_or_resize_) {
+ if (!details_.restore_bounds.IsEmpty())
+ ClearRestoreBounds(window());
sky 2012/09/06 19:45:11 Wait until the drag is complete before clearing th
Mr4D (OOO till 08-26) 2012/09/06 23:16:13 No. There is code which has special behavior when
RestackWindows();
+ }
did_move_or_resize_ = true;
}
@@ -214,6 +217,9 @@ void WorkspaceWindowResizer::RevertDrag() {
return;
window()->SetBounds(details_.initial_bounds);
+ if (!details_.restore_bounds.IsEmpty())
+ SetRestoreBoundsInScreen(details_.window, details_.restore_bounds);
+
if (details_.window_component == HTRIGHT) {
int last_x = details_.initial_bounds.right();
for (size_t i = 0; i < attached_windows_.size(); ++i) {
« ash/wm/window_resizer.cc ('K') | « ash/wm/workspace/frame_maximize_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698