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

Issue 679402 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 659155



Sign in to add a comment

Make Env::last_mouse_location() accurate for aura-mus

Project Member Reported by sky@chromium.org, Jan 9 2017

Issue description

In mus clients don't necessarily see all input events. Env::last_mouse_location() is updated when aura processes an event. This means Env::last_mouse_location() is not always accurate. For aura-mus WindowTreeClient::GetCursorScreenPoint() returns the current location of the mouse.

I suspect what we want to have happen is that if last_mouse_location() is called during processing an event we return the location that was set. If last_mouse_location() is called outside of processing an event then last_mouse_location() calls to WindowTreeClient::GetCursorScreenPoint(). This has the potential to be racy, but I don't see any other way.
 

Comment 1 by sky@chromium.org, Jan 27 2017

Owner: sky@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 1 2017

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

commit c19010b9bd9c531283b1157ed51a8af22ae665f4
Author: sky <sky@chromium.org>
Date: Wed Feb 01 19:17:27 2017

mash: make Env::last_mouse_location() accurate for Mus

This patch makes last_mouse_location() reflect the location of the
current event while processing an event, otherwise calls to
WindowTreeClient::GetCursorScreenPoint().

BUG= 679402 
TEST=none
R=sadrul@chromium.org

Review-Url: https://codereview.chromium.org/2657283003
Cr-Commit-Position: refs/heads/master@{#447570}

[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/BUILD.gn
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/env.cc
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/env.h
[add] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/mus/mus_mouse_location_updater.cc
[add] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/mus/mus_mouse_location_updater.h
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/test/aura_test_base.cc
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/test/aura_test_base.h
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/test/aura_test_helper.cc
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/test/env_test_helper.h
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/window_event_dispatcher.cc
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/window_event_dispatcher.h
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/window_event_dispatcher_unittest.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Feb 1 2017

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

commit c19010b9bd9c531283b1157ed51a8af22ae665f4
Author: sky <sky@chromium.org>
Date: Wed Feb 01 19:17:27 2017

mash: make Env::last_mouse_location() accurate for Mus

This patch makes last_mouse_location() reflect the location of the
current event while processing an event, otherwise calls to
WindowTreeClient::GetCursorScreenPoint().

BUG= 679402 
TEST=none
R=sadrul@chromium.org

Review-Url: https://codereview.chromium.org/2657283003
Cr-Commit-Position: refs/heads/master@{#447570}

[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/BUILD.gn
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/env.cc
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/env.h
[add] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/mus/mus_mouse_location_updater.cc
[add] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/mus/mus_mouse_location_updater.h
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/test/aura_test_base.cc
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/test/aura_test_base.h
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/test/aura_test_helper.cc
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/test/env_test_helper.h
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/window_event_dispatcher.cc
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/window_event_dispatcher.h
[modify] https://crrev.com/c19010b9bd9c531283b1157ed51a8af22ae665f4/ui/aura/window_event_dispatcher_unittest.cc

Comment 4 by sky@chromium.org, Feb 1 2017

Status: Fixed (was: Started)
Labels: mash

Comment 6 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59
Status: Verified (was: Fixed)

Sign in to add a comment