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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 10535131: Ignore simulated mouse move messages. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_win.h" 5 #include "content/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <peninputpanel_i.c> 8 #include <peninputpanel_i.c>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after
1794 return 0; 1794 return 0;
1795 } 1795 }
1796 } 1796 }
1797 1797
1798 LRESULT RenderWidgetHostViewWin::OnMouseEvent(UINT message, WPARAM wparam, 1798 LRESULT RenderWidgetHostViewWin::OnMouseEvent(UINT message, WPARAM wparam,
1799 LPARAM lparam, BOOL& handled) { 1799 LPARAM lparam, BOOL& handled) {
1800 handled = TRUE; 1800 handled = TRUE;
1801 1801
1802 // Windows sends (fake) mouse messages for touch events. Ignore these since 1802 // Windows sends (fake) mouse messages for touch events. Ignore these since
1803 // we're processing WM_TOUCH elsewhere. 1803 // we're processing WM_TOUCH elsewhere.
1804 if (touch_events_enabled_ && 1804 if (touch_events_enabled_ && (message == WM_MOUSEMOVE ||
sky 2012/06/12 16:51:51 The msdn docs this comes from mention it not worki
girard 2012/06/15 13:57:28 Tested on Win8. Will test on Win7 on Monday.
1805 (message == WM_LBUTTONDOWN || message == WM_LBUTTONUP || 1805 message == WM_LBUTTONDOWN || message == WM_LBUTTONUP ||
1806 message == WM_RBUTTONDOWN || message == WM_RBUTTONUP) && 1806 message == WM_RBUTTONDOWN || message == WM_RBUTTONUP) &&
1807 (GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) == 1807 (GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) ==
1808 MOUSEEVENTF_FROMTOUCH) 1808 MOUSEEVENTF_FROMTOUCH)
1809 return 0; 1809 return 0;
1810 1810
1811 if (message == WM_MOUSELEAVE) 1811 if (message == WM_MOUSELEAVE)
1812 ignore_mouse_movement_ = true; 1812 ignore_mouse_movement_ = true;
1813 1813
1814 if (mouse_locked_) { 1814 if (mouse_locked_) {
1815 HandleLockedMouseEvent(message, wparam, lparam); 1815 HandleLockedMouseEvent(message, wparam, lparam);
1816 MoveCursorToCenterIfNecessary(); 1816 MoveCursorToCenterIfNecessary();
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
3022 void RenderWidgetHostViewWin::ResetPointerDownContext() { 3022 void RenderWidgetHostViewWin::ResetPointerDownContext() {
3023 // If the default focus on the page is on an edit field and we did not 3023 // If the default focus on the page is on an edit field and we did not
3024 // receive a focus change in the context of a pointer down message, it means 3024 // receive a focus change in the context of a pointer down message, it means
3025 // that the pointer down message occurred on the edit field and we should 3025 // that the pointer down message occurred on the edit field and we should
3026 // display the on screen keyboard 3026 // display the on screen keyboard
3027 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) 3027 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_)
3028 DisplayOnScreenKeyboardIfNeeded(); 3028 DisplayOnScreenKeyboardIfNeeded();
3029 received_focus_change_after_pointer_down_ = false; 3029 received_focus_change_after_pointer_down_ = false;
3030 pointer_down_context_ = false; 3030 pointer_down_context_ = false;
3031 } 3031 }
OLDNEW
« 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