| Index: ash/wm/drag_window_resizer.cc
|
| diff --git a/ash/wm/drag_window_resizer.cc b/ash/wm/drag_window_resizer.cc
|
| index 214dbc5c730c3030b258dace74be5a933d2d7b72..c610465197d05c0cf4a1372812031ece62a41202 100644
|
| --- a/ash/wm/drag_window_resizer.cc
|
| +++ b/ash/wm/drag_window_resizer.cc
|
| @@ -76,6 +76,9 @@ void DragWindowResizer::Drag(const gfx::Point& location, int event_flags) {
|
| if (!resizer)
|
| return;
|
|
|
| + if (!GetTarget()->HasCapture())
|
| + GetTarget()->SetCapture();
|
| +
|
| last_mouse_location_ = location;
|
| // Show a phantom window for dragging in another root window.
|
| if (HasSecondaryRootWindow()) {
|
| @@ -103,6 +106,9 @@ void DragWindowResizer::CompleteDrag() {
|
| const gfx::Display dst_display =
|
| screen->GetDisplayNearestPoint(last_mouse_location_in_screen);
|
|
|
| + if (GetTarget()->HasCapture())
|
| + GetTarget()->ReleaseCapture();
|
| +
|
| if (dst_display.id() !=
|
| screen->GetDisplayNearestWindow(GetTarget()->GetRootWindow()).id()) {
|
| // Adjust the size and position so that it doesn't exceed the size of
|
| @@ -140,6 +146,9 @@ void DragWindowResizer::RevertDrag() {
|
|
|
| drag_window_controller_.reset();
|
| GetTarget()->layer()->SetOpacity(details().initial_opacity);
|
| +
|
| + if (GetTarget()->HasCapture())
|
| + GetTarget()->ReleaseCapture();
|
| }
|
|
|
| DragWindowResizer::DragWindowResizer(WindowResizer* next_window_resizer,
|
|
|