New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 741824 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

--touch-devices flag seems not effective in Chrome OS simulation on Linux (Ozone X11)

Project Member Reported by varkha@chromium.org, Jul 12 2017

Issue description

Chrome Version: 61.0.3151

What steps will reproduce the problem?
(1) Run Chrome OS build of Chrome on Linux with 2 mice attached and --touch-devices=<id> where id is obtained from xinput command output.
(2) Try using the second mouse as a touch input (e.g. resize a window or tap on shelf items).

What is the expected result?
Touch device handling.

What happens instead?
Device <id> is ignored.

 

Comment 1 by varkha@chromium.org, Jul 12 2017

The same flag seems to work fine with chromeos=0 linux build.
Labels: Proj-Ozone
Status: Started (was: Unconfirmed)
I took a look, the issue is that the coordinates of the touch event are already translated into the XWindow space vs XDisplay space that things like mouse events are in. X11WindowOzone checks the coordinates in XDisplaySpace, and depending where on your desktop the Xwindow is most events are not in it.

If the XWindow is at 0,0 it works correctly. I'll get that fixed today, should be simple.
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3def26c4e1279c811262fec8f75208743ff09865

commit 3def26c4e1279c811262fec8f75208743ff09865
Author: kylechar <kylechar@chromium.org>
Date: Thu Jul 13 20:20:23 2017

Fix --touch-devices in Ozone X11.

The |root_location| of the synthetic touch event isn't set which breaks
event dispatch. Since Ozone X11 is used for testing off device, and
proper touch screen associations don't exist, just set |root_location|
on the event.

Also only parse the --touch-devices flag once with Ozone X11, it's not
necessary to do it multiple times.

Testing with the following command works for both displays:

./chrome --ash-host-window-bounds=900x900,900+0-900x900 \
  --ash-touch-hud --touch-devices=X

Bug:  741824 
Change-Id: I0377db53eb07a4b1e1412dffbda4cc7325a55118
Reviewed-on: https://chromium-review.googlesource.com/570382
Commit-Queue: kylechar <kylechar@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486469}
[modify] https://crrev.com/3def26c4e1279c811262fec8f75208743ff09865/ui/events/platform/x11/x11_event_source_libevent.cc
[modify] https://crrev.com/3def26c4e1279c811262fec8f75208743ff09865/ui/ozone/platform/x11/ozone_platform_x11.cc
[modify] https://crrev.com/3def26c4e1279c811262fec8f75208743ff09865/ui/platform_window/x11/x11_window_base.cc
[modify] https://crrev.com/3def26c4e1279c811262fec8f75208743ff09865/ui/platform_window/x11/x11_window_ozone.cc

Status: Fixed (was: Started)
Cc: est...@chromium.org
estade@: FYI
Status: Verified (was: Fixed)

Sign in to add a comment