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

Unified Diff: ash/wm/default_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: It looks like if git merged wrong here... 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
« no previous file with comments | « no previous file | ash/wm/frame_painter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/default_window_resizer.cc
diff --git a/ash/wm/default_window_resizer.cc b/ash/wm/default_window_resizer.cc
index 50cac97ec88565457538334325e3eb6541d979ae..dd874e38aab4fc6fe4e6e85a530f6ef3282af27c 100644
--- a/ash/wm/default_window_resizer.cc
+++ b/ash/wm/default_window_resizer.cc
@@ -7,6 +7,7 @@
#include "ash/shell.h"
#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/cursor_manager.h"
+#include "ash/wm/property_util.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
@@ -42,6 +43,8 @@ void DefaultWindowResizer::Drag(const gfx::Point& location, int event_flags) {
gfx::Rect bounds(CalculateBoundsForDrag(details_, location));
if (bounds != details_.window->bounds()) {
+ if (!did_move_or_resize_ && !details_.restore_bounds.IsEmpty())
+ ClearRestoreBounds(details_.window);
did_move_or_resize_ = true;
details_.window->SetBounds(bounds);
}
@@ -55,6 +58,9 @@ void DefaultWindowResizer::RevertDrag() {
return;
details_.window->SetBounds(details_.initial_bounds);
+
+ if (!details_.restore_bounds.IsEmpty())
+ SetRestoreBoundsInScreen(details_.window, details_.restore_bounds);
}
aura::Window* DefaultWindowResizer::GetTarget() {
« no previous file with comments | « no previous file | ash/wm/frame_painter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698