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

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: Moved code section into separate function 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/frame_painter.cc ('K') | « ash/wm/frame_painter.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..86c42e38f320acab5ccea0064c44b775f95ca25c 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -94,6 +94,16 @@ WorkspaceWindowResizer* WorkspaceWindowResizer::Create(
const gfx::Point& location_in_parent,
int window_component,
const std::vector<aura::Window*>& attached_windows) {
+ if (wm::IsWindowNormal(window) && window_component == HTCAPTION) {
+ // When a restore bounds is stored for the window, it gets restored to its
+ // original size.
+ const gfx::Rect *restore = GetRestoreBoundsInScreen(window);
+ if (restore) {
+ gfx::Rect bounds = gfx::Rect(window->bounds().origin(), restore->size());
+ window->SetBounds(bounds);
sky 2012/09/05 17:03:24 This is the wrong place for this. Doing it here me
Mr4D (OOO till 08-26) 2012/09/06 16:06:54 Done.
+ ClearRestoreBounds(window);
+ }
+ }
Details details(window, location_in_parent, window_component);
return details.is_resizable ?
new WorkspaceWindowResizer(details, attached_windows) : NULL;
« ash/wm/frame_painter.cc ('K') | « ash/wm/frame_painter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698