Force touch events to be dispatched on FNL BUG= R=cstout@chromium.org, jamesr@chromium.org Review URL: https://codereview.chromium.org/1485233002 .
diff --git a/ui/ozone/platform/drm/BUILD.gn b/ui/ozone/platform/drm/BUILD.gn index 5f011b1..85e5c4d 100644 --- a/ui/ozone/platform/drm/BUILD.gn +++ b/ui/ozone/platform/drm/BUILD.gn
@@ -110,6 +110,10 @@ ] } + if (is_fnl) { + defines += [ "FORCE_DISPATCH_TOUCH_EVENTS" ] + } + deps = [ "//base", "//skia",
diff --git a/ui/ozone/platform/drm/host/drm_window_host.cc b/ui/ozone/platform/drm/host/drm_window_host.cc index 51c19ce..5cba0cb 100644 --- a/ui/ozone/platform/drm/host/drm_window_host.cc +++ b/ui/ozone/platform/drm/host/drm_window_host.cc
@@ -128,6 +128,18 @@ return grabber == widget_; if (event->IsTouchEvent()) { +#ifdef FORCE_DISPATCH_TOUCH_EVENTS + // TODO(lanechr): This bypasses checks that ensure that touch events + // are dispatched to the right display. The "right display" is defined as + // "the display associated with the touch device." Displays are associated + // with touch devices through DeviceDataManager::UpdateTouchInfoForDisplay, + // which (as of today) is never called. + // + // I'm not sure yet how to best determine touchscreen/display association, + // but FNL currently only supports devices with one touch screen. So for + // now, always dispatch touch events on FNL devices. + return true; +#endif // 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