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

Unified Diff: services/ui/input_manager/input_associate.cc

Issue 1687513002: Make the first app to request input win (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/input_manager/input_associate.cc
diff --git a/services/ui/input_manager/input_associate.cc b/services/ui/input_manager/input_associate.cc
index 7d739bce2ca900201976440d36993777413bee8a..c97f7056647dee59a122ded1222b0095cabdbed0 100644
--- a/services/ui/input_manager/input_associate.cc
+++ b/services/ui/input_manager/input_associate.cc
@@ -54,7 +54,8 @@ void InputAssociate::SetListener(mojo::ui::ViewToken* view_token,
mojo::ui::InputListenerPtr listener) {
// TODO(jeffbrown): This simple hack just hooks up the first listener
// ever seen.
- listener_ = listener.Pass();
+ if (!listener_)
+ listener_ = listener.Pass();
}
void InputAssociate::DispatchEvent(mojo::ui::ViewTreeToken* view_tree_token,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698