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

Unified Diff: ui/aura/root_window.cc

Issue 9363037: aura: Fix setting touch-handler and gesture-handler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index f79d4e0ad07a6315e038b8941a6d741462de02ee..79ffdf14f7cb94ea5709f5261b0df1974410119b 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -216,7 +216,8 @@ bool RootWindow::DispatchTouchEvent(TouchEvent* event) {
if (target) {
TouchEvent translated_event(*event, this, target);
status = ProcessTouchEvent(target, &translated_event);
- if (status == ui::TOUCH_STATUS_START)
+ if (status == ui::TOUCH_STATUS_START ||
+ status == ui::TOUCH_STATUS_QUEUED)
touch_event_handler_ = target;
else if (status == ui::TOUCH_STATUS_END ||
status == ui::TOUCH_STATUS_CANCEL)
@@ -392,8 +393,11 @@ void RootWindow::ReleaseCapture(Window* window) {
void RootWindow::AdvanceQueuedTouchEvent(Window* window, bool processed) {
scoped_ptr<GestureRecognizer::Gestures> gestures;
+ Window* old_gesture_handler = gesture_handler_;
+ gesture_handler_ = window;
gestures.reset(gesture_recognizer_->AdvanceTouchQueue(window, processed));
ProcessGestures(gestures.get());
+ gesture_handler_ = old_gesture_handler;
}
void RootWindow::SetGestureRecognizerForTesting(GestureRecognizer* gr) {
« 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