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

Unified Diff: mojo/services/window_manager/focus_controller.cc

Issue 724973003: Get event targetting working for mouse events. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: More comments, de-const a bunch of stuff in ui/. Created 6 years, 1 month 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 | « mojo/services/window_manager/BUILD.gn ('k') | mojo/services/window_manager/view_event_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/window_manager/focus_controller.cc
diff --git a/mojo/services/window_manager/focus_controller.cc b/mojo/services/window_manager/focus_controller.cc
index 26346e3e16e13a3fdbddf5b4cd7b09a9567543c9..ac24ade8aac308eeee2c71ab62c696922666a33d 100644
--- a/mojo/services/window_manager/focus_controller.cc
+++ b/mojo/services/window_manager/focus_controller.cc
@@ -118,8 +118,7 @@ void FocusController::OnKeyEvent(ui::KeyEvent* event) {
void FocusController::OnMouseEvent(ui::MouseEvent* event) {
if (event->type() == ui::ET_MOUSE_PRESSED && !event->handled()) {
- View* view = mojo::WindowManagerApp::GetViewForViewTarget(
- static_cast<ViewTarget*>(event->target()));
+ View* view = static_cast<ViewTarget*>(event->target())->view();
ViewFocusedFromInputEvent(view);
}
}
@@ -134,8 +133,7 @@ void FocusController::OnGestureEvent(ui::GestureEvent* event) {
if (event->type() == ui::ET_GESTURE_BEGIN &&
event->details().touch_points() == 1 &&
!event->handled()) {
- View* view = mojo::WindowManagerApp::GetViewForViewTarget(
- static_cast<ViewTarget*>(event->target()));
+ View* view = static_cast<ViewTarget*>(event->target())->view();
ViewFocusedFromInputEvent(view);
}
}
« no previous file with comments | « mojo/services/window_manager/BUILD.gn ('k') | mojo/services/window_manager/view_event_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698