From 658bf2834a191f4c1f943be7d1f859b7b5362d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branko=20=C4=8Cibej?= Date: Wed, 27 Feb 2019 19:17:21 +0000 Subject: [PATCH] Linux: Add support for the Chrome command-line option --touch-devices (issue #2205). --- libcef/browser/browser_main.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libcef/browser/browser_main.cc b/libcef/browser/browser_main.cc index 1bcccf114..7e7d4df46 100644 --- a/libcef/browser/browser_main.cc +++ b/libcef/browser/browser_main.cc @@ -36,6 +36,10 @@ #include "ui/base/material_design/material_design_controller.h" #include "ui/base/resource/resource_bundle.h" +#if defined(USE_AURA) && defined(USE_X11) +#include "ui/events/devices/x11/touch_factory_x11.h" +#endif + #if defined(USE_AURA) #include "ui/aura/env.h" #include "ui/display/screen.h" @@ -107,6 +111,10 @@ void CefBrowserMainParts::ToolkitInitialized() { } void CefBrowserMainParts::PreMainMessageLoopStart() { +#if defined(USE_AURA) && defined(USE_X11) + ui::TouchFactory::SetTouchDeviceListFromCommandLine(); +#endif + for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) chrome_extra_parts_[i]->PreMainMessageLoopStart(); }