| 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_window_event_filter.h" | 5 #include "ui/views/widget/x11_window_event_filter.h" |
| 6 | 6 |
| 7 #include <X11/extensions/XInput.h> | 7 #include <X11/extensions/XInput.h> |
| 8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
| 9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
| 10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 int component = | 104 int component = |
| 105 target->delegate()->GetNonClientComponent(event->location()); | 105 target->delegate()->GetNonClientComponent(event->location()); |
| 106 if (component == HTCLIENT) | 106 if (component == HTCLIENT) |
| 107 return false; | 107 return false; |
| 108 | 108 |
| 109 // Get the |x_root_window_| location out of the native event. | 109 // Get the |x_root_window_| location out of the native event. |
| 110 gfx::Point root_location = event->system_location(); | 110 gfx::Point root_location = event->system_location(); |
| 111 return DispatchHostWindowDragMovement(component, root_location); | 111 return DispatchHostWindowDragMovement(component, root_location); |
| 112 } | 112 } |
| 113 | 113 |
| 114 ui::TouchStatus X11WindowEventFilter::PreHandleTouchEvent( | 114 ui::EventResult X11WindowEventFilter::PreHandleTouchEvent( |
| 115 aura::Window* target, | 115 aura::Window* target, |
| 116 ui::TouchEvent* event) { | 116 ui::TouchEvent* event) { |
| 117 return ui::TOUCH_STATUS_UNKNOWN; | 117 return ui::ER_UNHANDLED; |
| 118 } | 118 } |
| 119 | 119 |
| 120 ui::EventResult X11WindowEventFilter::PreHandleGestureEvent( | 120 ui::EventResult X11WindowEventFilter::PreHandleGestureEvent( |
| 121 aura::Window* target, | 121 aura::Window* target, |
| 122 ui::GestureEvent* event) { | 122 ui::GestureEvent* event) { |
| 123 return ui::ER_UNHANDLED; | 123 return ui::ER_UNHANDLED; |
| 124 } | 124 } |
| 125 | 125 |
| 126 bool X11WindowEventFilter::DispatchHostWindowDragMovement( | 126 bool X11WindowEventFilter::DispatchHostWindowDragMovement( |
| 127 int hittest, | 127 int hittest, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 XSendEvent(xdisplay_, x_root_window_, False, | 181 XSendEvent(xdisplay_, x_root_window_, False, |
| 182 SubstructureRedirectMask | SubstructureNotifyMask, | 182 SubstructureRedirectMask | SubstructureNotifyMask, |
| 183 &event); | 183 &event); |
| 184 | 184 |
| 185 return true; | 185 return true; |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace views | 188 } // namespace views |
| 189 | 189 |
| OLD | NEW |