diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-02-13 15:16:02 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-12-05 17:03:25 +0100 |
commit | 7beb742d983b70cf333161d0cd97a0a2722fce85 (patch) | |
tree | 495e3a0e30656a3dff4ba30678f7f92cdda3af36 | |
parent | ccdb6dd681199e5d9ce4e0f9534a032eb8004fef (diff) | |
download | qtwebengine-chromium-7beb742d983b70cf333161d0cd97a0a2722fce85.tar.gz |
Fix build with use_glib=false and use_x11=true
Fix what appears to be bitrot in the libevent implementation of XEvent
handling so that it works in X11 builds.
Change-Id: Ie348c57a263a2360e623f28c06ebdbf501681749
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r-- | chromium/ui/events/platform/x11/x11_event_source_libevent.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chromium/ui/events/platform/x11/x11_event_source_libevent.cc b/chromium/ui/events/platform/x11/x11_event_source_libevent.cc index 05d7f8751a5..aaebde42449 100644 --- a/chromium/ui/events/platform/x11/x11_event_source_libevent.cc +++ b/chromium/ui/events/platform/x11/x11_event_source_libevent.cc @@ -164,6 +164,10 @@ void X11EventSourceLibevent::RemoveXEventDispatcher( } void X11EventSourceLibevent::ProcessXEvent(XEvent* xevent) { +#if defined(USE_X11) + // DispatchEvent takes ui::PlatformEvent which is XEvent* + DispatchEvent(xevent); +#else std::unique_ptr<ui::Event> translated_event = TranslateXEventToEvent(*xevent); if (translated_event) { DispatchEvent(translated_event.get()); @@ -172,6 +176,7 @@ void X11EventSourceLibevent::ProcessXEvent(XEvent* xevent) { // directly to XEventDispatchers. DispatchXEventToXEventDispatchers(xevent); } +#endif } void X11EventSourceLibevent::AddEventWatcher() { @@ -211,4 +216,10 @@ void X11EventSourceLibevent::OnFileCanWriteWithoutBlocking(int fd) { NOTREACHED(); } +#if defined(USE_X11) +std::unique_ptr<PlatformEventSource> PlatformEventSource::CreateDefault() { + return base::MakeUnique<X11EventSourceLibevent>(gfx::GetXDisplay()); +} +#endif + } // namespace ui |