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 |