diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-13 18:43:25 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-13 18:43:25 +0000 |
commit | 6cc8682cb8cc6439976e480992b9dbb27877dee3 (patch) | |
tree | 86c43b7fce0548e37e93e4e9e707b0315d07271d | |
parent | fcb6c11829fa78427c8dfa9ac5851874a141575e (diff) | |
download | chromium_src-6cc8682cb8cc6439976e480992b9dbb27877dee3.zip chromium_src-6cc8682cb8cc6439976e480992b9dbb27877dee3.tar.gz chromium_src-6cc8682cb8cc6439976e480992b9dbb27877dee3.tar.bz2 |
My previous refactoring of the mouse-wheel redirecting code
caused menus (such as the book-mark menu) to be closed on mouse-wheel scroll.
I had put the rerouting of the mouse-wheel messages in the RenderWidgetViewWin::OnWheelEvent after the workaround for the Thinkpad mousewheel driver, which closes the popups.
In the original code, the rerouting was done in the FocusManager by way of sub-classing and was therefore happening before RenderWidgetViewWin::OnWheelEvent.
This CL reverts to the original order which fixes the bug.
BUG=9752
TEST=Have a profile with lots of bookmarks in a folder on the bookmark toolbar, click on the folder to bring up the scrollable menu. The menu should scroll when you use the mouse-wheel.
Review URL: http://codereview.chromium.org/67063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13609 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_win.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc index 5174ef0a..9b3182c 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc @@ -930,6 +930,14 @@ LRESULT RenderWidgetHostViewWin::OnKeyEvent(UINT message, WPARAM wparam, 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. @@ -941,14 +949,6 @@ LRESULT RenderWidgetHostViewWin::OnWheelEvent(UINT message, WPARAM wparam, 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; |