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

Unified Diff: examples/window_manager/window_manager.cc

Issue 724973003: Get event targetting working for mouse events. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Move on top of the recently committed local view property stuff. 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 | « no previous file | mojo/services/window_manager/BUILD.gn » ('j') | mojo/services/window_manager/view_target.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/window_manager/window_manager.cc
diff --git a/examples/window_manager/window_manager.cc b/examples/window_manager/window_manager.cc
index 90c63d21fed5fd215e03b0801f4ec2eb5dd42cb0..7069d6521e670c48a07483d0295a0146f70f6150 100644
--- a/examples/window_manager/window_manager.cc
+++ b/examples/window_manager/window_manager.cc
@@ -396,8 +396,7 @@ class WindowManager
// Overridden from ui::EventHandler:
virtual void OnEvent(ui::Event* event) override {
- View* view = WindowManagerApp::GetViewForViewTarget(
- static_cast<ViewTarget*>(event->target()));
+ View* view = static_cast<ViewTarget*>(event->target())->view();
if (event->type() == ui::ET_MOUSE_PRESSED &&
!IsDescendantOfKeyboard(view)) {
view->SetFocus();
« no previous file with comments | « no previous file | mojo/services/window_manager/BUILD.gn » ('j') | mojo/services/window_manager/view_target.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698