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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_win.cc

Issue 11098077: Grab mouse capture in the WM_POINTERDOWN message handler in the omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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: chrome/browser/ui/views/omnibox/omnibox_view_win.cc
===================================================================
--- chrome/browser/ui/views/omnibox/omnibox_view_win.cc (revision 160963)
+++ chrome/browser/ui/views/omnibox/omnibox_view_win.cc (working copy)
@@ -1449,23 +1449,29 @@
LRESULT OmniboxViewWin::OnPointerDown(UINT message,
WPARAM wparam,
LPARAM lparam) {
- if (!model()->has_focus())
+ if (!model()->has_focus()) {
SetFocus();
+ // The WM_POINTERDOWN message is received in Windows 8 mode when we touch
+ // the window/click on it. There appears to be a bug in Windows 8 where in
+ // the generated WM_LBUTTONDOWN/UP messages go to the window which
+ // previously had focus. We set capture here to ensure that the generated
+ // mouse messages come to us.
+ SetCapture();
+ }
if (IS_POINTER_FIRSTBUTTON_WPARAM(wparam)) {
TrackMousePosition(kLeft, CPoint(GET_X_LPARAM(lparam),
GET_Y_LPARAM(lparam)));
}
-
SetMsgHandled(false);
-
return 0;
}
LRESULT OmniboxViewWin::OnPointerUp(UINT message, WPARAM wparam,
LPARAM lparam) {
SetMsgHandled(false);
-
+ if (m_hWnd == GetCapture())
sky 2012/10/11 21:28:12 Is this invoked as you release each finger? If so,
ananta 2012/10/11 21:59:10 The only way to get info about touch points is to
+ ReleaseCapture();
return 0;
}
« 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