Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Unified Diff: components/mus/ws/event_dispatcher.cc

Issue 1881253002: mus: Implement ScreenMus::GetCursorScreenPoint(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually apply the 32bit patch now that the delegate crash was fixed. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..0e551a4e9f2c47121c84fe3c16d71cd414c91a65 100644
--- a/components/mus/ws/event_dispatcher.cc
+++ b/components/mus/ws/event_dispatcher.cc
@@ -108,6 +108,7 @@ void EventDispatcher::SetMousePointerScreenLocation(
DCHECK(pointer_targets_.empty());
mouse_pointer_last_location_ = screen_location;
UpdateCursorProviderByLastKnownLocation();
+ delegate_->OnMouseCursorLocationChanged(screen_location);
sky 2016/04/27 20:10:28 I worry that the way you have things results in up
}
bool EventDispatcher::SetCaptureWindow(ServerWindow* window,
@@ -241,8 +242,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.

Powered by Google App Engine
This is Rietveld 408576698