summaryrefslogtreecommitdiffstats
path: root/views/touchui
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 23:43:26 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 23:43:26 +0000
commitcd446c6cb4acd4afba06e18c0b84f6f8e1ba2ca3 (patch)
treed0d41dd262a3d4a069f37651a4e640ba39f1390f /views/touchui
parentbaff1d0461a2d10eb9f99b64d3fd724e7b363a44 (diff)
downloadchromium_src-cd446c6cb4acd4afba06e18c0b84f6f8e1ba2ca3.zip
chromium_src-cd446c6cb4acd4afba06e18c0b84f6f8e1ba2ca3.tar.gz
chromium_src-cd446c6cb4acd4afba06e18c0b84f6f8e1ba2ca3.tar.bz2
Fix a few issues with touch-events and views-desktop.
* Activate a widget when it is touched. * Drop a synthetic mouse event on the toplevel widget instead of the immediate parent widget. * Send touch-events to the captured view if there is one. BUG=none TEST=manually Review URL: http://codereview.chromium.org/7540002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/touchui')
-rw-r--r--views/touchui/gesture_manager.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/views/touchui/gesture_manager.cc b/views/touchui/gesture_manager.cc
index 3f70f30..830ce04 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;
}