| 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/x11_desktop_window_move_client.h" | 5 #include "ui/views/widget/x11_desktop_window_move_client.h" |
| 6 | 6 |
| 7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
| 8 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. | 8 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. |
| 9 #undef RootWindow | 9 #undef RootWindow |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 return false; | 57 return false; |
| 58 } | 58 } |
| 59 | 59 |
| 60 ui::TouchStatus X11DesktopWindowMoveClient::PreHandleTouchEvent( | 60 ui::TouchStatus X11DesktopWindowMoveClient::PreHandleTouchEvent( |
| 61 aura::Window* target, | 61 aura::Window* target, |
| 62 ui::TouchEvent* event) { | 62 ui::TouchEvent* event) { |
| 63 return ui::TOUCH_STATUS_UNKNOWN; | 63 return ui::TOUCH_STATUS_UNKNOWN; |
| 64 } | 64 } |
| 65 | 65 |
| 66 ui::GestureStatus X11DesktopWindowMoveClient::PreHandleGestureEvent( | 66 ui::EventResult X11DesktopWindowMoveClient::PreHandleGestureEvent( |
| 67 aura::Window* target, | 67 aura::Window* target, |
| 68 ui::GestureEvent* event) { | 68 ui::GestureEvent* event) { |
| 69 return ui::GESTURE_STATUS_UNKNOWN; | 69 return ui::ER_UNHANDLED; |
| 70 } | 70 } |
| 71 | 71 |
| 72 void X11DesktopWindowMoveClient::RunMoveLoop(aura::Window* source, | 72 void X11DesktopWindowMoveClient::RunMoveLoop(aura::Window* source, |
| 73 const gfx::Point& drag_offset) { | 73 const gfx::Point& drag_offset) { |
| 74 DCHECK(!in_move_loop_); // Can only handle one nested loop at a time. | 74 DCHECK(!in_move_loop_); // Can only handle one nested loop at a time. |
| 75 in_move_loop_ = true; | 75 in_move_loop_ = true; |
| 76 window_offset_ = drag_offset; | 76 window_offset_ = drag_offset; |
| 77 | 77 |
| 78 source->GetRootWindow()->ShowRootWindow(); | 78 source->GetRootWindow()->ShowRootWindow(); |
| 79 | 79 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 // Ungrab before we let go of the window. | 115 // Ungrab before we let go of the window. |
| 116 Display* display = base::MessagePumpAuraX11::GetDefaultXDisplay(); | 116 Display* display = base::MessagePumpAuraX11::GetDefaultXDisplay(); |
| 117 XUngrabPointer(display, CurrentTime); | 117 XUngrabPointer(display, CurrentTime); |
| 118 | 118 |
| 119 in_move_loop_ = false; | 119 in_move_loop_ = false; |
| 120 quit_closure_.Run(); | 120 quit_closure_.Run(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 } // namespace views | 123 } // namespace views |
| OLD | NEW |