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

Issue 766174 link

Starred by 1 user

Issue metadata

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

Blocking:
issue 672311



Sign in to add a comment

Implement rect-based hit-test data provider for Exo

Project Member Reported by varkha@chromium.org, Sep 18 2017

Issue description

We need ability to target Exo windows that have hit-test area different from the window bounds.

Exo uses several classes, all called CustomWindowTargeter and all subclasses of WindowTargeter:
- exo::Surface::CustomWindowTargeter
- exo::SurfaceTreeHost::CustomWindowTargeter
- exo::ShellSurface::CustomWindowTargeter

Surface::state_.input_region can be used to collect all rects in it, then send to Viz similar to what HitTestDataProviderAura [1] is doing for Aura windows with shapes using ShapedAppWindowTargeter [2].

exo::Surface::CustomWindowTargeter is also used to filter stylus events so we may need an additional flag similar to kHitTestMouse and kHitTestTouch [3].

Test with --use-viz-hit-test and an Exo window that has a hit-test region defined.

[1] https://cs.chromium.org/chromium/src/ui/aura/hit_test_data_provider_aura.h?type=cs&sq=package:chromium&l=19
[2] https://cs.chromium.org/chromium/src/chrome/browser/ui/views/apps/shaped_app_window_targeter.cc?type=cs&l=17
[3] - https://cs.chromium.org/chromium/src/services/viz/public/interfaces/hit_test/hit_test_region_list.mojom?type=cs&q=kHitTestMouse&sq=package:chromium&l=28
 

Comment 1 by varkha@chromium.org, Sep 19 2017

Blocking: 672311
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 27 2017

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

commit b921f3fc6dba79c3af2c04311e54b88ec34c3ab0
Author: Peng Huang <penghuang@chromium.org>
Date: Wed Sep 27 20:01:23 2017

exo: send surface's input region to mus

The surface input region doesn't work in mus and mash. This CL
implements WindowTargeter::GetExtraHitTestShapeRects() for
exo::Surface::window_. In mus and mash, this function will be called and
returned hittest rects will be sent to mus.

Bug:  766174 
Change-Id: I67dc04cc331f0174ff3390920c3de98c00100df5
Reviewed-on: https://chromium-review.googlesource.com/685277
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504758}
[modify] https://crrev.com/b921f3fc6dba79c3af2c04311e54b88ec34c3ab0/components/exo/surface.cc
[modify] https://crrev.com/b921f3fc6dba79c3af2c04311e54b88ec34c3ab0/components/exo/surface.h
[modify] https://crrev.com/b921f3fc6dba79c3af2c04311e54b88ec34c3ab0/components/exo/surface_unittest.cc

Status: Fixed (was: Assigned)

Comment 4 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 5 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)
Components: -Internals>MUS Internals>Services>WindowService

Sign in to add a comment