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

Unified Diff: ui/aura/root_window.cc

Issue 10306014: Calibrating touch input (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressing last nits Created 8 years, 7 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 | ui/base/ui_base_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index aeb3651bd788d7937dfccff504cd475a57a3de6f..aebeb51c0695930a763fd1bb6b2ed2f110ad13c1 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -311,6 +311,7 @@ bool RootWindow::DispatchTouchEvent(TouchEvent* event) {
// root window.
target = this;
} else {
+ // We only come here when the first contact was within the root window.
if (!target)
target = GetEventHandlerForPoint(event->location());
if (!target)
@@ -659,7 +660,10 @@ ui::TouchStatus RootWindow::ProcessTouchEvent(Window* target,
return ui::TOUCH_STATUS_UNKNOWN;
EventFilters filters;
- GetEventFiltersToNotify(target->parent(), &filters);
+ if (target == this)
+ GetEventFiltersToNotify(target, &filters);
+ else
+ GetEventFiltersToNotify(target->parent(), &filters);
for (EventFilters::const_reverse_iterator it = filters.rbegin(),
rend = filters.rend();
it != rend; ++it) {
@@ -668,7 +672,10 @@ ui::TouchStatus RootWindow::ProcessTouchEvent(Window* target,
return status;
}
- return target->delegate()->OnTouchEvent(event);
+ if (target->delegate())
+ return target->delegate()->OnTouchEvent(event);
+
+ return ui::TOUCH_STATUS_UNKNOWN;
}
ui::GestureStatus RootWindow::ProcessGestureEvent(Window* target,
« no previous file with comments | « no previous file | ui/base/ui_base_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698