OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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/platform_window/x11/x11_window_ozone.h" | 5 #include "ui/platform_window/x11/x11_window_ozone.h" |
6 | 6 |
7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 | 8 |
| 9 #include "base/bind.h" |
9 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
10 #include "ui/events/ozone/events_ozone.h" | 11 #include "ui/events/ozone/events_ozone.h" |
11 #include "ui/events/platform/x11/x11_event_source.h" | 12 #include "ui/events/platform/x11/x11_event_source.h" |
12 #include "ui/gfx/geometry/point.h" | 13 #include "ui/gfx/geometry/point.h" |
13 #include "ui/platform_window/x11/x11_cursor_ozone.h" | 14 #include "ui/platform_window/x11/x11_cursor_ozone.h" |
14 #include "ui/platform_window/x11/x11_window_manager_ozone.h" | 15 #include "ui/platform_window/x11/x11_window_manager_ozone.h" |
15 | 16 |
16 namespace ui { | 17 namespace ui { |
17 | 18 |
18 X11WindowOzone::X11WindowOzone(X11EventSourceLibevent* event_source, | 19 X11WindowOzone::X11WindowOzone(X11EventSourceLibevent* event_source, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 uint32_t X11WindowOzone::DispatchEvent(const PlatformEvent& platform_event) { | 77 uint32_t X11WindowOzone::DispatchEvent(const PlatformEvent& platform_event) { |
77 // This is unfortunately needed otherwise events that depend on global state | 78 // This is unfortunately needed otherwise events that depend on global state |
78 // (eg. double click) are broken. | 79 // (eg. double click) are broken. |
79 DispatchEventFromNativeUiEvent( | 80 DispatchEventFromNativeUiEvent( |
80 platform_event, base::Bind(&PlatformWindowDelegate::DispatchEvent, | 81 platform_event, base::Bind(&PlatformWindowDelegate::DispatchEvent, |
81 base::Unretained(delegate()))); | 82 base::Unretained(delegate()))); |
82 return POST_DISPATCH_STOP_PROPAGATION; | 83 return POST_DISPATCH_STOP_PROPAGATION; |
83 } | 84 } |
84 | 85 |
85 } // namespace ui | 86 } // namespace ui |
OLD | NEW |