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

Side by Side Diff: ash/wm/workspace/workspace_window_resizer.cc

Issue 11363177: Don't use drag to corner resizing for unresizable windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few self nits Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/window_util.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 ClearRestoreBounds(window()); 279 ClearRestoreBounds(window());
280 RestackWindows(); 280 RestackWindows();
281 } 281 }
282 did_move_or_resize_ = true; 282 did_move_or_resize_ = true;
283 } 283 }
284 284
285 gfx::Point location_in_screen = location_in_parent; 285 gfx::Point location_in_screen = location_in_parent;
286 wm::ConvertPointToScreen(window()->parent(), &location_in_screen); 286 wm::ConvertPointToScreen(window()->parent(), &location_in_screen);
287 const bool in_original_root = 287 const bool in_original_root =
288 wm::GetRootWindowAt(location_in_screen) == window()->GetRootWindow(); 288 wm::GetRootWindowAt(location_in_screen) == window()->GetRootWindow();
289
289 // Hide a phantom window for snapping if the cursor is in another root window. 290 // Hide a phantom window for snapping if the cursor is in another root window.
290 if (in_original_root) { 291 if (in_original_root && wm::CanResizeWindow(window())) {
sky 2012/11/12 22:09:08 What is preventing the window from being resized b
Mr4D (OOO till 08-26) 2012/11/13 01:39:53 Corner resizing: the FramePainter::NonClientHitTes
291 UpdateSnapPhantomWindow(location_in_parent, bounds); 292 UpdateSnapPhantomWindow(location_in_parent, bounds);
292 } else { 293 } else {
293 snap_type_ = SNAP_NONE; 294 snap_type_ = SNAP_NONE;
294 snap_phantom_window_controller_.reset(); 295 snap_phantom_window_controller_.reset();
295 } 296 }
296 297
297 if (!attached_windows_.empty()) 298 if (!attached_windows_.empty())
298 LayoutAttachedWindows(bounds); 299 LayoutAttachedWindows(bounds);
299 if (bounds != window()->bounds()) { 300 if (bounds != window()->bounds()) {
300 bool destroyed = false; 301 bool destroyed = false;
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 gfx::Rect layer_bounds = layer_->bounds(); 834 gfx::Rect layer_bounds = layer_->bounds();
834 layer_bounds.set_origin(gfx::Point(0, 0)); 835 layer_bounds.set_origin(gfx::Point(0, 0));
835 layer_->SetBounds(layer_bounds); 836 layer_->SetBounds(layer_bounds);
836 layer_->SetVisible(false); 837 layer_->SetVisible(false);
837 // Detach it from the current container. 838 // Detach it from the current container.
838 layer_->parent()->Remove(layer_); 839 layer_->parent()->Remove(layer_);
839 } 840 }
840 841
841 } // namespace internal 842 } // namespace internal
842 } // namespace ash 843 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_util.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698