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

Unified Diff: ui/events/platform/x11/x11_event_source_libevent.cc

Issue 2791693003: [Ozone/x11] events can be dispatched to the wrong window
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/platform/x11/x11_event_source_libevent.cc
diff --git a/ui/events/platform/x11/x11_event_source_libevent.cc b/ui/events/platform/x11/x11_event_source_libevent.cc
index 7edd46c84661c99ee44eef5d3667cdec56b8b6c6..48580de449e5ce7cbb96592510b886be83df14af 100644
--- a/ui/events/platform/x11/x11_event_source_libevent.cc
+++ b/ui/events/platform/x11/x11_event_source_libevent.cc
@@ -158,7 +158,8 @@ void X11EventSourceLibevent::RemoveXEventDispatcher(
void X11EventSourceLibevent::ProcessXEvent(XEvent* xevent) {
std::unique_ptr<ui::Event> translated_event = TranslateXEventToEvent(*xevent);
if (translated_event) {
- DispatchEvent(translated_event.get());
+ EventWithPlatformEvent ewxe = {translated_event.get(), xevent};
+ DispatchEvent(&ewxe);
sadrul 2017/04/04 04:02:06 This is fairly hacky. Maybe this should always go
} else {
// Only if we can't translate XEvent into ui::Event, try to dispatch XEvent
// directly to XEventDispatchers.

Powered by Google App Engine
This is Rietveld 408576698