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

Unified Diff: ui/arc/notification/arc_custom_notification_view.cc

Issue 2799573002: Fix the check to distinguish accessibility events. (Closed)
Patch Set: add a comment Created 3 years, 8 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: ui/arc/notification/arc_custom_notification_view.cc
diff --git a/ui/arc/notification/arc_custom_notification_view.cc b/ui/arc/notification/arc_custom_notification_view.cc
index d640556c32c2f29ddc19f24d7f48010a9cb6f930..39c3c6e4337eb5797c2e18d6bbb02ad7862aee98 100644
--- a/ui/arc/notification/arc_custom_notification_view.cc
+++ b/ui/arc/notification/arc_custom_notification_view.cc
@@ -553,9 +553,12 @@ bool ArcCustomNotificationView::OnMousePressed(const ui::MouseEvent& event) {
// All mouse clicks or touches should be sent to corresponding Android view
// because the surface is on this view, so receiving a mouse pressed event
// means the event is generated by automation API.
+ // We can distinguish events from automation API by checking the target of the
+ // event because the target of all events generated by automation API is set
+ // to nullptr.
if (event.IsOnlyLeftMouseButton() &&
item_->expand_state() != mojom::ArcNotificationExpandState::FIXED_SIZE &&
- event.target() != surface_->window()) {
+ event.target() == nullptr) {
item_->ToggleExpansion();
return true;
}
« 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