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

Unified Diff: views/touchui/gesture_manager.cc

Issue 7540002: Fix a few issues with touch-events and views-desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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 | « views/events/event.h ('k') | views/widget/native_widget_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/touchui/gesture_manager.cc
diff --git a/views/touchui/gesture_manager.cc b/views/touchui/gesture_manager.cc
index 3f70f301152d0dcebf9585eb13bc786545d5b541..830ce04d99864a4bdef649b9f0dbd634793b747c 100644
--- a/views/touchui/gesture_manager.cc
+++ b/views/touchui/gesture_manager.cc
@@ -32,9 +32,12 @@ bool GestureManager::ProcessTouchEventForGesture(const TouchEvent& event,
// event distribution code works by turning all touch inputs into
// mouse approximations.
+ // Conver the touch-event into a mouse-event. This mouse-event gets its
+ // location information from the native-event, so it needs to drop on the
+ // toplevel widget instead of just source->GetWidget.
Event::FromNativeEvent2 from_native;
MouseEvent mouseev(event, from_native);
- source->GetWidget()->OnMouseEvent(mouseev);
+ source->GetWidget()->GetTopLevelWidget()->OnMouseEvent(mouseev);
return true;
}
« no previous file with comments | « views/events/event.h ('k') | views/widget/native_widget_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698