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

Unified 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: Addressed 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 side-by-side diff with in-line comments
Download patch
« 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 »
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 ab5782a347c6afe9c06cd8cae5286db063e5e9a5..eda27a49ffe996678e1bd012d82c7d571eef7948 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -36,6 +36,10 @@ scoped_ptr<WindowResizer> CreateWindowResizer(aura::Window* window,
const gfx::Point& point_in_parent,
int window_component) {
DCHECK(window);
+ // No need to return a resizer when the window cannot get resized.
+ if (!wm::CanResizeWindow(window) && window_component != HTCAPTION)
+ return scoped_ptr<WindowResizer>();
+
if (window->parent() &&
window->parent()->id() == internal::kShellWindowId_WorkspaceContainer) {
// Allow dragging maximized windows if it's not tracked by workspace. This
@@ -287,7 +291,7 @@ void WorkspaceWindowResizer::Drag(const gfx::Point& location_in_parent,
const bool in_original_root =
wm::GetRootWindowAt(location_in_screen) == window()->GetRootWindow();
// Hide a phantom window for snapping if the cursor is in another root window.
- if (in_original_root) {
+ if (in_original_root && wm::CanResizeWindow(window())) {
UpdateSnapPhantomWindow(location_in_parent, bounds);
} else {
snap_type_ = SNAP_NONE;
« 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