Chromium Code Reviews| Index: ash/wm/toplevel_window_event_handler.cc |
| diff --git a/ash/wm/toplevel_window_event_handler.cc b/ash/wm/toplevel_window_event_handler.cc |
| index 5c4d9578433bf66b9d6efe8f5758529c7ee49e4c..b9a3f06e6abc77c7456a8432bf61315f82b5d737 100644 |
| --- a/ash/wm/toplevel_window_event_handler.cc |
| +++ b/ash/wm/toplevel_window_event_handler.cc |
| @@ -5,7 +5,9 @@ |
| #include "ash/wm/toplevel_window_event_handler.h" |
| #include "ash/aura/wm_window_aura.h" |
| +#include "ash/common/wm/window_state.h" |
| #include "ash/shell.h" |
| +#include "ash/wm/window_state_aura.h" |
| #include "base/message_loop/message_loop.h" |
| #include "base/run_loop.h" |
| #include "ui/aura/client/cursor_client.h" |
| @@ -87,8 +89,16 @@ aura::client::WindowMoveResult ToplevelWindowEventHandler::RunMoveLoop( |
| base::MessageLoop* loop = base::MessageLoop::current(); |
| base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop); |
| + // Disable window position auto management while dragging and restore it |
| + // aftrewards. |
| + wm::WindowState* window_state = wm::GetWindowState(source); |
| + const bool window_position_managed = window_state->window_position_managed(); |
| + window_state->set_window_position_managed(false); |
|
sky
2016/11/28 18:30:42
How about adding test coverage of this to ash?
afakhry
2016/11/28 19:22:29
Done. Please check if what I added is enough or mo
|
| + |
| run_loop.Run(); |
| + window_state->set_window_position_managed(window_position_managed); |
|
sky
2016/11/28 18:30:42
I think you should assume that if 'this' has been
afakhry
2016/11/28 19:22:29
Done.
|
| + |
| if (!weak_ptr) |
| return aura::client::MOVE_CANCELED; |