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; |
} |