diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-07 15:20:00 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-07 15:20:00 +0000 |
commit | 53900d0715c882d9b8ae8281a17272143fd77143 (patch) | |
tree | 4f97611cdd2e379dd03b9aa018122364ae731758 | |
parent | 81502db60102ce82450113c755cba4987bd311ab (diff) | |
download | chromium_src-53900d0715c882d9b8ae8281a17272143fd77143.zip chromium_src-53900d0715c882d9b8ae8281a17272143fd77143.tar.gz chromium_src-53900d0715c882d9b8ae8281a17272143fd77143.tar.bz2 |
Interpret double click events as mouse down on Windows.
Remove redundant code from a conditional block.
BUG=78636
TEST=Double click to close neighboring tabs via (x)
Review URL: http://codereview.chromium.org/6813014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80780 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | views/events/event_win.cc | 12 | ||||
-rw-r--r-- | views/window/window_win.cc | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/views/events/event_win.cc b/views/events/event_win.cc index ad19185..cd1d715 100644 --- a/views/events/event_win.cc +++ b/views/events/event_win.cc @@ -34,24 +34,24 @@ ui::EventType EventTypeFromNative(NativeEvent native_event) { case WM_KEYUP: case WM_SYSKEYUP: return ui::ET_KEY_RELEASED; + case WM_LBUTTONDBLCLK: case WM_LBUTTONDOWN: + case WM_MBUTTONDBLCLK: case WM_MBUTTONDOWN: + case WM_NCLBUTTONDBLCLK: case WM_NCLBUTTONDOWN: + case WM_NCMBUTTONDBLCLK: case WM_NCMBUTTONDOWN: + case WM_NCRBUTTONDBLCLK: case WM_NCRBUTTONDOWN: + case WM_RBUTTONDBLCLK: case WM_RBUTTONDOWN: return ui::ET_MOUSE_PRESSED; - case WM_LBUTTONDBLCLK: case WM_LBUTTONUP: - case WM_MBUTTONDBLCLK: case WM_MBUTTONUP: - case WM_NCLBUTTONDBLCLK: case WM_NCLBUTTONUP: - case WM_NCMBUTTONDBLCLK: case WM_NCMBUTTONUP: - case WM_NCRBUTTONDBLCLK: case WM_NCRBUTTONUP: - case WM_RBUTTONDBLCLK: case WM_RBUTTONUP: return ui::ET_MOUSE_RELEASED; case WM_MOUSEMOVE: diff --git a/views/window/window_win.cc b/views/window/window_win.cc index 1d63555..df9ca69 100644 --- a/views/window/window_win.cc +++ b/views/window/window_win.cc @@ -511,8 +511,6 @@ LRESULT WindowWin::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) { // Combine |w_param| with common key state message flags. w_param |= ((GetKeyState(VK_CONTROL) & 0x80) == 0x80)? MK_CONTROL : 0; w_param |= ((GetKeyState(VK_SHIFT) & 0x80) == 0x80)? MK_SHIFT : 0; - WidgetWin::OnMouseRange(message, w_param, l_param); - return 0; } } } else if (message == WM_NCRBUTTONDOWN && |