OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/platform_window/x11/x11_window.h" |
| 6 |
| 7 #include <X11/extensions/XInput2.h> |
| 8 #include <X11/Xlib.h> |
| 9 |
| 10 #include "ui/events/event.h" |
| 11 #include "ui/events/ozone/events_ozone.h" |
| 12 #include "ui/events/x/events_x_utils.h" |
| 13 #include "ui/gfx/geometry/point.h" |
| 14 |
| 15 namespace ui { |
| 16 |
| 17 void X11Window::SetCursor(PlatformCursor cursor) {} |
| 18 |
| 19 void X11Window::ProcessXInput2Event(XEvent* xev) { |
| 20 NOTREACHED(); |
| 21 } |
| 22 |
| 23 bool X11Window::CanDispatchEvent(const PlatformEvent& event) { |
| 24 return true; |
| 25 } |
| 26 |
| 27 uint32_t X11Window::DispatchEvent(const PlatformEvent& platform_event) { |
| 28 Event* event = static_cast<Event*>(platform_event); |
| 29 DispatchEventFromNativeUiEvent( |
| 30 event, base::Bind(&PlatformWindowDelegate::DispatchEvent, |
| 31 base::Unretained(delegate_))); |
| 32 |
| 33 return POST_DISPATCH_STOP_PROPAGATION; |
| 34 } |
| 35 |
| 36 bool X11Window::DispatchXEvent(const XEvent& xev) { |
| 37 if (XWindowFromXEvent(xev) != xwindow_) |
| 38 return false; |
| 39 |
| 40 ProcessXWindowEvent(xev); |
| 41 return true; |
| 42 } |
| 43 |
| 44 } // namespace ui |
OLD | NEW |