Commit d216c7a1 authored by Mike Wasserman's avatar Mike Wasserman Committed by Commit Bot

ws: Apply hit test insets to touch edit handle client roots.

Touch selection editing handles use window targeting insets.
(to let users more easily tap text above the visible handle)

Adjust targeting of the handle's client root window in Mus.
(otherwise events target the server's invisible root window)

Bug: 872891
Test: KSV (Ctrl-Alt-/) touch edit handles don't block tapping text.
Change-Id: I6d8614257dc4927a1562bc02c2eefef1f8ff2faa
Reviewed-on: https://chromium-review.googlesource.com/1226877Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591478}
parent 45cb1008
......@@ -222,8 +222,12 @@ class TouchSelectionControllerImpl::EditingHandleView
weak_ptr_factory_(this) {
widget_.reset(CreateTouchSelectionPopupWidget(context, this));
aura::Window* window = widget_->GetNativeWindow();
targeter_ = new aura::WindowTargeter();
aura::Window* window = widget_->GetNativeWindow();
// For Mus clients, adjust targeting of the handle's client root window,
// constructed by the window server for the handle's "content" window.
if (window->env()->mode() == aura::Env::Mode::MUS)
window = window->GetRootWindow();
window->SetEventTargeter(std::unique_ptr<aura::WindowTargeter>(targeter_));
// We are owned by the TouchSelectionControllerImpl.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment