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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 67063: Fix for bug where mouse-wheel closes menus (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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/renderer_host/render_widget_host_view_win.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_win.cc (revision 13515)
+++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy)
@@ -875,6 +875,14 @@
LRESULT RenderWidgetHostViewWin::OnWheelEvent(UINT message, WPARAM wparam,
LPARAM lparam, BOOL& handled) {
+ // Forward the mouse-wheel message to the window under the mouse if it belongs
+ // to us.
+ if (message == WM_MOUSEWHEEL &&
+ views::RerouteMouseWheel(m_hWnd, wparam, lparam)) {
+ handled = TRUE;
+ return 0;
+ }
+
// Workaround for Thinkpad mousewheel driver. We get mouse wheel/scroll
// messages even if we are not in the foreground. So here we check if
// we have any owned popup windows in the foreground and dismiss them.
@@ -886,14 +894,6 @@
reinterpret_cast<LPARAM>(toplevel_hwnd));
}
- // Forward the mouse-wheel message to the window under the mouse if it belongs
- // to us.
- if (message == WM_MOUSEWHEEL &&
- views::RerouteMouseWheel(m_hWnd, wparam, lparam)) {
- handled = TRUE;
- return 0;
- }
-
// This is a bit of a hack, but will work for now since we don't want to
// pollute this object with WebContents-specific functionality...
bool handled_by_webcontents = false;
« 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