Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/widget/desktop_aura/x11_desktop_window_move_client.h" | 5 #include "ui/views/widget/desktop_aura/x11_desktop_window_move_client.h" |
| 6 | 6 |
| 7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
| 8 | 8 |
| 9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 | 41 |
| 42 //////////////////////////////////////////////////////////////////////////////// | 42 //////////////////////////////////////////////////////////////////////////////// |
| 43 // DesktopWindowTreeHostLinux, aura::client::WindowMoveClient implementation: | 43 // DesktopWindowTreeHostLinux, aura::client::WindowMoveClient implementation: |
| 44 | 44 |
| 45 aura::client::WindowMoveResult X11DesktopWindowMoveClient::RunMoveLoop( | 45 aura::client::WindowMoveResult X11DesktopWindowMoveClient::RunMoveLoop( |
| 46 aura::Window* source, | 46 aura::Window* source, |
| 47 const gfx::Vector2d& drag_offset, | 47 const gfx::Vector2d& drag_offset, |
| 48 aura::client::WindowMoveSource move_source) { | 48 aura::client::WindowMoveSource move_source) { |
| 49 window_offset_ = drag_offset; | 49 window_offset_ = drag_offset; |
| 50 host_ = source->GetHost(); | 50 host_ = source->GetHost(); |
| 51 host_->SetCapture(); | |
|
pkotwicz
2014/05/07 02:22:24
Did you end up figuring out why this is necessary?
varkha
2014/05/07 02:28:54
No, but since this is largely a refactoring CL thi
varkha
2014/05/07 19:54:28
Yes, since the TabDragController releases capture
| |
| 51 | 52 |
| 52 bool success = move_loop_.RunMoveLoop(source, host_->last_cursor()); | 53 bool success = move_loop_.RunMoveLoop(host_->last_cursor()); |
| 54 source->GetHost()->ReleaseCapture(); | |
|
sadrul
2014/05/07 14:18:16
host_->ReleaseCapture()? (or is it possible for |t
varkha
2014/05/07 19:54:28
host_ gets reset in OnMoveLoopEnded() in this clas
| |
| 53 return success ? aura::client::MOVE_SUCCESSFUL : aura::client::MOVE_CANCELED; | 55 return success ? aura::client::MOVE_SUCCESSFUL : aura::client::MOVE_CANCELED; |
| 54 } | 56 } |
| 55 | 57 |
| 56 void X11DesktopWindowMoveClient::EndMoveLoop() { | 58 void X11DesktopWindowMoveClient::EndMoveLoop() { |
| 57 move_loop_.EndMoveLoop(); | 59 move_loop_.EndMoveLoop(); |
| 58 } | 60 } |
| 59 | 61 |
| 60 } // namespace views | 62 } // namespace views |
| OLD | NEW |