| Index: components/mus/ws/event_dispatcher.cc
|
| diff --git a/components/mus/ws/event_dispatcher.cc b/components/mus/ws/event_dispatcher.cc
|
| index 69d7fa155ecaf903264d89c6736a20eb9dd75b5a..ecc2debbe62d0c667cc17284efdcdff56e3e0327 100644
|
| --- a/components/mus/ws/event_dispatcher.cc
|
| +++ b/components/mus/ws/event_dispatcher.cc
|
| @@ -108,6 +108,10 @@ void EventDispatcher::SetMousePointerScreenLocation(
|
| DCHECK(pointer_targets_.empty());
|
| mouse_pointer_last_location_ = screen_location;
|
| UpdateCursorProviderByLastKnownLocation();
|
| + // Write our initial location back to our shared screen coordinate. This
|
| + // shouldn't cause problems because we already read the cursor before we
|
| + // process any events in views during window construction.
|
| + delegate_->OnMouseCursorLocationChanged(screen_location);
|
| }
|
|
|
| bool EventDispatcher::SetCaptureWindow(ServerWindow* window,
|
| @@ -241,8 +245,10 @@ void EventDispatcher::ProcessLocatedEvent(const ui::LocatedEvent& event) {
|
| const bool is_mouse_event =
|
| event.IsMousePointerEvent() || event.IsMouseWheelEvent();
|
|
|
| - if (is_mouse_event)
|
| + if (is_mouse_event) {
|
| mouse_pointer_last_location_ = event.location();
|
| + delegate_->OnMouseCursorLocationChanged(event.root_location());
|
| + }
|
|
|
| // Release capture on pointer up. For mouse we only release if there are
|
| // no buttons down.
|
|
|