Commit 7fbdbc7c authored by Sidney San Martín's avatar Sidney San Martín Committed by Commit Bot

Make the touch emulator's cursor appear consistently

Web content refreshes its desired cursor on every mouse event, but
TouchEmulator did not, so the custom "grey circle" touch cursor could
get lost when, say, you move your mouse out of and back into its bounds.

This change make the touch emulator work like web content and refresh
its cursor on every mouse event.

Bug: 989006
Change-Id: If9a943b276b250363541384878cea9a2ddab117e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1867090Reviewed-by: default avatarNavid Zolghadr <nzolghadr@chromium.org>
Commit-Queue: Sidney San Martín <sdy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707837}
parent 8439aae2
...@@ -182,6 +182,8 @@ bool TouchEmulator::HandleMouseEvent(const WebMouseEvent& mouse_event, ...@@ -182,6 +182,8 @@ bool TouchEmulator::HandleMouseEvent(const WebMouseEvent& mouse_event,
if (!enabled() || mode_ != Mode::kEmulatingTouchFromMouse) if (!enabled() || mode_ != Mode::kEmulatingTouchFromMouse)
return false; return false;
UpdateCursor();
if (mouse_event.button == WebMouseEvent::Button::kRight && if (mouse_event.button == WebMouseEvent::Button::kRight &&
mouse_event.GetType() == WebInputEvent::kMouseDown) { mouse_event.GetType() == WebInputEvent::kMouseDown) {
client_->ShowContextMenuAtPoint( client_->ShowContextMenuAtPoint(
......
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