Chromium Code Reviews| 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; |