| 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..131e974fe97e55b35f654da255830239a777f698 100644
|
| --- a/services/ui/ws/event_matcher.cc
|
| +++ b/services/ui/ws/event_matcher.cc
|
| @@ -76,7 +76,9 @@ 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_;
|
| + // Synthetic flags should never be matched against.
|
| + constexpr int kSyntheticFlags = EF_IS_SYNTHESIZED | EF_IS_REPEAT;
|
| + int flags = event.flags() & ~(ignore_event_flags_ | kSyntheticFlags);
|
| if ((fields_to_match_ & FLAGS) && flags != event_flags_)
|
| return false;
|
| if (fields_to_match_ & KEYBOARD_CODE) {
|
|
|