summaryrefslogtreecommitdiff
path: root/chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-03 13:42:47 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-15 10:27:51 +0000
commit8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec (patch)
treed29d987c4d7b173cf853279b79a51598f104b403 /chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc
parent830c9e163d31a9180fadca926b3e1d7dfffb5021 (diff)
downloadqtwebengine-chromium-8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec.tar.gz
BASELINE: Update Chromium to 66.0.3359.156
Change-Id: I0c9831ad39911a086b6377b16f995ad75a51e441 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc')
-rw-r--r--chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc b/chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc
index 5242dc7f55c..4cc71e34d38 100644
--- a/chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc
+++ b/chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc
@@ -10,6 +10,7 @@
#include <utility>
+#include "base/bind.h"
#include "base/files/scoped_file.h"
#include "base/memory/ptr_util.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -509,6 +510,16 @@ void InputDeviceFactoryEvdev::EnablePalmSuppression(bool enabled) {
return;
palm_suppression_enabled_ = enabled;
+ // This function can be called while disabling pen devices, so don't disable
+ // inline here.
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::BindOnce(&InputDeviceFactoryEvdev::EnableDevices,
+ weak_ptr_factory_.GetWeakPtr()));
+}
+
+void InputDeviceFactoryEvdev::EnableDevices() {
+ // TODO(spang): Fix the UI to not dismiss menus when we use
+ // ApplyInputDeviceSettings() instead of this function.
for (const auto& it : converters_)
it.second->SetEnabled(IsDeviceEnabled(it.second.get()));
}