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

Unified Diff: ui/ozone/platform/drm/host/drm_window_host.cc

Issue 1412623006: Developer Feature: Add Debug Accelerators to Toggle Touchscreen/Touchpad On or Off (CrOS) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix actions.xml. Created 5 years, 2 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/ozone/platform/drm/host/drm_window_host.cc
diff --git a/ui/ozone/platform/drm/host/drm_window_host.cc b/ui/ozone/platform/drm/host/drm_window_host.cc
index 183322d744c7344841ef238386dd9462ba37b1f3..d26b6523b9598b7fca6cea20ab115eeb4f873093 100644
--- a/ui/ozone/platform/drm/host/drm_window_host.cc
+++ b/ui/ozone/platform/drm/host/drm_window_host.cc
@@ -5,6 +5,7 @@
#include "ui/ozone/platform/drm/host/drm_window_host.h"
#include "base/bind.h"
+#include "ui/base/touch/touch_enabled.h"
#include "ui/events/devices/device_data_manager.h"
#include "ui/events/event.h"
#include "ui/events/ozone/evdev/event_factory_evdev.h"
@@ -138,6 +139,9 @@ bool DrmWindowHost::CanDispatchEvent(const PlatformEvent& ne) {
return grabber == widget_;
if (event->IsTouchEvent()) {
+ if (!ui::AreTouchEventsEnabled())
+ return false;
+
// Dispatch the event if it is from the touchscreen associated with the
// DrmWindowHost. We cannot check the event's location because if the
// touchscreen has a bezel, touches in the bezel have a location outside of

Powered by Google App Engine
This is Rietveld 408576698