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

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

Issue 750593003: Ozone X11 platform Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup leftover stuff Created 6 years 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
« no previous file with comments | « ui/events/platform/x11/x11_event_source.h ('k') | ui/events/x/events_x.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/platform/x11/x11_event_source.cc
diff --git a/ui/events/platform/x11/x11_event_source.cc b/ui/events/platform/x11/x11_event_source.cc
index 5101f2703a3bff44f677e1c64db1a2ec09532980..09a040b6209155d929a9caa61427ee3a2eb877ce 100644
--- a/ui/events/platform/x11/x11_event_source.cc
+++ b/ui/events/platform/x11/x11_event_source.cc
@@ -14,6 +14,7 @@
#include "ui/events/event_utils.h"
#include "ui/events/platform/platform_event_dispatcher.h"
#include "ui/events/platform/x11/x11_hotplug_event_handler.h"
+#include "ui/events/x/events_x.h"
#include "ui/gfx/x/x11_types.h"
namespace ui {
@@ -120,14 +121,20 @@ void X11EventSource::BlockUntilWindowMapped(XID window) {
////////////////////////////////////////////////////////////////////////////////
// X11EventSource, private
-uint32_t X11EventSource::DispatchEvent(XEvent* xevent) {
+uint32_t X11EventSource::DispatchEvent(base::NativeEvent event) {
+ XEvent* xevent = static_cast<XEvent*>(event);
bool have_cookie = false;
if (xevent->type == GenericEvent &&
XGetEventData(xevent->xgeneric.display, &xevent->xcookie)) {
have_cookie = true;
}
- uint32_t action = PlatformEventSource::DispatchEvent(xevent);
+ uint32_t action = POST_DISPATCH_STOP_PROPAGATION;
+#if defined(USE_OZONE) && !defined(USE_X11)
+ event = TranslateXEventToNativeEvent(xevent);
+#endif
+ if (event)
+ action = PlatformEventSource::DispatchEvent(event);
if (xevent->type == GenericEvent &&
xevent->xgeneric.evtype == XI_HierarchyChanged) {
ui::UpdateDeviceList();
« no previous file with comments | « ui/events/platform/x11/x11_event_source.h ('k') | ui/events/x/events_x.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698