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

Unified Diff: services/ui/ws/event_matcher.cc

Issue 2788753002: services/ui: make autorepeat work with accelerator. (Closed)
Patch Set: Created 3 years, 9 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/ws/event_matcher.cc
diff --git a/services/ui/ws/event_matcher.cc b/services/ui/ws/event_matcher.cc
index 1cd91568adfa074c902c10146cb81be267ce0536..8739792bea78dbfd48b5e528f2a3a95d890e90de 100644
--- a/services/ui/ws/event_matcher.cc
+++ b/services/ui/ws/event_matcher.cc
@@ -76,7 +76,8 @@ EventMatcher::~EventMatcher() {}
bool EventMatcher::MatchesEvent(const ui::Event& event) const {
if ((fields_to_match_ & TYPE) && event.type() != event_type_)
return false;
- int flags = event.flags() & ~ignore_event_flags_;
+ constexpr int kIgnoreFlags = EF_IS_SYNTHESIZED | EF_IS_REPEAT;
sky 2017/03/30 23:44:43 Please add a comment here. Also, I would name this
Peng 2017/03/31 14:09:22 Done.
+ int flags = event.flags() & ~(ignore_event_flags_ | kIgnoreFlags);
if ((fields_to_match_ & FLAGS) && flags != event_flags_)
return false;
if (fields_to_match_ & KEYBOARD_CODE) {
« 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