Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: ui/events/platform/x11/x11_event_source_libevent.h

Issue 2791693003: [Ozone/x11] events can be dispatched to the wrong window
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_LIBEVENT_H_ 5 #ifndef UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_LIBEVENT_H_
6 #define UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_LIBEVENT_H_ 6 #define UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_LIBEVENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_pump_libevent.h" 9 #include "base/message_loop/message_pump_libevent.h"
10 #include "ui/events/events_export.h" 10 #include "ui/events/events_export.h"
11 #include "ui/events/platform/platform_event_source.h" 11 #include "ui/events/platform/platform_event_source.h"
12 #include "ui/events/platform/x11/x11_event_source.h" 12 #include "ui/events/platform/x11/x11_event_source.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 class Event;
17
18 struct EVENTS_EXPORT EventWithPlatformEvent {
19 Event* event;
20 PlatformEvent platform_event;
21 };
22
16 // Interface for classes that want to receive XEvent directly. Only used with 23 // Interface for classes that want to receive XEvent directly. Only used with
17 // Ozone X11 currently and only events that can't be translated into ui::Events 24 // Ozone X11 currently and only events that can't be translated into ui::Events
18 // are sent via this path. 25 // are sent via this path.
19 class EVENTS_EXPORT XEventDispatcher { 26 class EVENTS_EXPORT XEventDispatcher {
20 public: 27 public:
21 // Sends XEvent to XEventDispatcher for handling. Returns true if the XEvent 28 // Sends XEvent to XEventDispatcher for handling. Returns true if the XEvent
22 // was dispatched, otherwise false. After the first XEventDispatcher returns 29 // was dispatched, otherwise false. After the first XEventDispatcher returns
23 // true XEvent dispatching stops. 30 // true XEvent dispatching stops.
24 virtual bool DispatchXEvent(XEvent* xevent) = 0; 31 virtual bool DispatchXEvent(XEvent* xevent) = 0;
25 32
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 79
73 base::MessagePumpLibevent::FileDescriptorWatcher watcher_controller_; 80 base::MessagePumpLibevent::FileDescriptorWatcher watcher_controller_;
74 bool initialized_ = false; 81 bool initialized_ = false;
75 82
76 DISALLOW_COPY_AND_ASSIGN(X11EventSourceLibevent); 83 DISALLOW_COPY_AND_ASSIGN(X11EventSourceLibevent);
77 }; 84 };
78 85
79 } // namespace ui 86 } // namespace ui
80 87
81 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_LIBEVENT_H_ 88 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_LIBEVENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698