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

Unified Diff: components/mus/event_dispatcher.cc

Issue 1313353010: Overhaul Mandoline event transport code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed gn check Created 5 years, 3 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
« no previous file with comments | « components/mus/display_manager.cc ('k') | components/mus/gesture_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/event_dispatcher.cc
diff --git a/components/mus/event_dispatcher.cc b/components/mus/event_dispatcher.cc
index d6ee0ba0ff504d2e26499bf623eb901e10dc86fb..c505f2f668bdbf7c03dd39dc5b76e0a3b350ebdd 100644
--- a/components/mus/event_dispatcher.cc
+++ b/components/mus/event_dispatcher.cc
@@ -73,8 +73,9 @@ ServerView* EventDispatcher::FindEventTarget(mojo::Event* event) {
ServerView* focused_view = view_tree_host_->GetFocusedView();
if (event->pointer_data) {
ServerView* root = view_tree_host_->root_view();
- const gfx::Point root_point(static_cast<int>(event->pointer_data->x),
- static_cast<int>(event->pointer_data->y));
+ const gfx::Point root_point(
+ static_cast<int>(event->pointer_data->location->x),
+ static_cast<int>(event->pointer_data->location->y));
ServerView* target = focused_view;
if (event->action == mojo::EVENT_TYPE_POINTER_DOWN || !target ||
!root->Contains(target)) {
@@ -82,10 +83,10 @@ ServerView* EventDispatcher::FindEventTarget(mojo::Event* event) {
CHECK(target);
}
const gfx::PointF local_point(ConvertPointFBetweenViews(
- root, target,
- gfx::PointF(event->pointer_data->x, event->pointer_data->y)));
- event->pointer_data->x = local_point.x();
- event->pointer_data->y = local_point.y();
+ root, target, gfx::PointF(event->pointer_data->location->x,
+ event->pointer_data->location->y)));
+ event->pointer_data->location->x = local_point.x();
+ event->pointer_data->location->y = local_point.y();
return target;
}
« no previous file with comments | « components/mus/display_manager.cc ('k') | components/mus/gesture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698