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

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: 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 | « no previous file | 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 ab5782a347c6afe9c06cd8cae5286db063e5e9a5..52757bc2f152803639f5e29c7cc9383bcaa79589 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -29,6 +29,8 @@
#include "ui/compositor/layer.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/transform.h"
+#include "ui/views/widget/widget.h"
+#include "ui/views/widget/widget_delegate.h"
namespace ash {
@@ -286,8 +288,14 @@ void WorkspaceWindowResizer::Drag(const gfx::Point& location_in_parent,
wm::ConvertPointToScreen(window()->parent(), &location_in_screen);
const bool in_original_root =
wm::GetRootWindowAt(location_in_screen) == window()->GetRootWindow();
+
+ bool resizeable = true;
+ views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window());
sky 2012/11/12 03:56:08 If all windows were created by widgets, this chang
Mr4D (OOO till 08-26) 2012/11/12 18:25:01 Done.
+ if (widget && widget->widget_delegate())
+ resizeable = widget->widget_delegate()->CanResize();
+
// Hide a phantom window for snapping if the cursor is in another root window.
- if (in_original_root) {
+ if (in_original_root && resizeable) {
UpdateSnapPhantomWindow(location_in_parent, bounds);
} else {
snap_type_ = SNAP_NONE;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698