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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 1565013002: Don't send touch events to windows like menus when the touch occurs outside the menu bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build redness Created 4 years, 11 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
Index: ui/aura/window_event_dispatcher.cc
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index 92b3b9f10092d2d998afd1fefd028f4d8ded4d84..b6fe01510e0d9d1cce3e776cbb9d856573fafb73 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -102,7 +102,8 @@ WindowEventDispatcher::~WindowEventDispatcher() {
void WindowEventDispatcher::RepostEvent(const ui::LocatedEvent& event) {
DCHECK(event.type() == ui::ET_MOUSE_PRESSED ||
- event.type() == ui::ET_GESTURE_TAP_DOWN);
+ event.type() == ui::ET_GESTURE_TAP_DOWN ||
+ event.type() == ui::ET_TOUCH_PRESSED);
sky 2016/01/12 21:16:42 You'll want to update the description in the .h fo
ananta 2016/01/13 01:21:24 Done.
// We allow for only one outstanding repostable event. This is used
// in exiting context menus. A dropped repost request is allowed.
if (event.type() == ui::ET_MOUSE_PRESSED) {
@@ -115,6 +116,11 @@ void WindowEventDispatcher::RepostEvent(const ui::LocatedEvent& event) {
FROM_HERE, base::Bind(
base::IgnoreResult(&WindowEventDispatcher::DispatchHeldEvents),
repost_event_factory_.GetWeakPtr()));
+ } else if (event.type() == ui::ET_TOUCH_PRESSED) {
+ DispatchDetails details = OnEventFromSource(
sky 2016/01/12 21:16:42 Doesn't this process immediatley right here? Don't
ananta 2016/01/13 01:21:24 Done.
+ const_cast<ui::LocatedEvent*>(&event));
+ if (details.dispatcher_destroyed)
+ return;
} else {
DCHECK(event.type() == ui::ET_GESTURE_TAP_DOWN);
held_repostable_event_.reset();

Powered by Google App Engine
This is Rietveld 408576698