summaryrefslogtreecommitdiffstats
path: root/chrome/views/widget_win.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-04 22:23:07 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-04 22:23:07 +0000
commit4c9b24cce158bb1ce97c34af55ad865b86499719 (patch)
treec147ac2d85c1008718adcecf77925940bd416b50 /chrome/views/widget_win.cc
parent5be424c82a3ea9ec7550a3d2f00bc2ce57a88583 (diff)
downloadchromium_src-4c9b24cce158bb1ce97c34af55ad865b86499719.zip
chromium_src-4c9b24cce158bb1ce97c34af55ad865b86499719.tar.gz
chromium_src-4c9b24cce158bb1ce97c34af55ad865b86499719.tar.bz2
Revert r9953 since it caused regressions like:
http://crbug.com/8287 Eyeballing the code in RootView, this change seems wrong. Review URL: http://codereview.chromium.org/40124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10929 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/widget_win.cc')
-rw-r--r--chrome/views/widget_win.cc33
1 files changed, 14 insertions, 19 deletions
diff --git a/chrome/views/widget_win.cc b/chrome/views/widget_win.cc
index d89bcd2..85f81c8 100644
--- a/chrome/views/widget_win.cc
+++ b/chrome/views/widget_win.cc
@@ -533,7 +533,7 @@ void WidgetWin::OnKeyUp(TCHAR c, UINT rep_cnt, UINT flags) {
}
void WidgetWin::OnLButtonDown(UINT flags, const CPoint& point) {
- ProcessMousePressed(point, flags | MK_LBUTTON, false, false);
+ ProcessMousePressed(point, flags | MK_LBUTTON, false);
}
void WidgetWin::OnLButtonUp(UINT flags, const CPoint& point) {
@@ -541,11 +541,11 @@ void WidgetWin::OnLButtonUp(UINT flags, const CPoint& point) {
}
void WidgetWin::OnLButtonDblClk(UINT flags, const CPoint& point) {
- ProcessMousePressed(point, flags | MK_LBUTTON, true, false);
+ ProcessMousePressed(point, flags | MK_LBUTTON, true);
}
void WidgetWin::OnMButtonDown(UINT flags, const CPoint& point) {
- ProcessMousePressed(point, flags | MK_MBUTTON, false, false);
+ ProcessMousePressed(point, flags | MK_MBUTTON, false);
}
void WidgetWin::OnMButtonUp(UINT flags, const CPoint& point) {
@@ -553,7 +553,7 @@ void WidgetWin::OnMButtonUp(UINT flags, const CPoint& point) {
}
void WidgetWin::OnMButtonDblClk(UINT flags, const CPoint& point) {
- ProcessMousePressed(point, flags | MK_MBUTTON, true, false);
+ ProcessMousePressed(point, flags | MK_MBUTTON, true);
}
LRESULT WidgetWin::OnMouseActivate(HWND window, UINT hittest_code,
@@ -588,11 +588,11 @@ LRESULT WidgetWin::OnMouseRange(UINT msg, WPARAM w_param, LPARAM l_param) {
}
void WidgetWin::OnNCLButtonDblClk(UINT flags, const CPoint& point) {
- SetMsgHandled(ProcessMousePressed(point, flags | MK_LBUTTON, true, true));
+ SetMsgHandled(FALSE);
}
void WidgetWin::OnNCLButtonDown(UINT flags, const CPoint& point) {
- SetMsgHandled(ProcessMousePressed(point, flags | MK_LBUTTON, false, true));
+ SetMsgHandled(FALSE);
}
void WidgetWin::OnNCLButtonUp(UINT flags, const CPoint& point) {
@@ -600,11 +600,11 @@ void WidgetWin::OnNCLButtonUp(UINT flags, const CPoint& point) {
}
void WidgetWin::OnNCMButtonDblClk(UINT flags, const CPoint& point) {
- SetMsgHandled(ProcessMousePressed(point, flags | MK_MBUTTON, true, true));
+ SetMsgHandled(FALSE);
}
void WidgetWin::OnNCMButtonDown(UINT flags, const CPoint& point) {
- SetMsgHandled(ProcessMousePressed(point, flags | MK_MBUTTON, false, true));
+ SetMsgHandled(FALSE);
}
void WidgetWin::OnNCMButtonUp(UINT flags, const CPoint& point) {
@@ -629,11 +629,11 @@ LRESULT WidgetWin::OnNCMouseMove(UINT flags, const CPoint& point) {
}
void WidgetWin::OnNCRButtonDblClk(UINT flags, const CPoint& point) {
- SetMsgHandled(ProcessMousePressed(point, flags | MK_RBUTTON, true, true));
+ SetMsgHandled(FALSE);
}
void WidgetWin::OnNCRButtonDown(UINT flags, const CPoint& point) {
- SetMsgHandled(ProcessMousePressed(point, flags | MK_RBUTTON, false, true));
+ SetMsgHandled(FALSE);
}
void WidgetWin::OnNCRButtonUp(UINT flags, const CPoint& point) {
@@ -659,7 +659,7 @@ void WidgetWin::OnPaint(HDC dc) {
}
void WidgetWin::OnRButtonDown(UINT flags, const CPoint& point) {
- ProcessMousePressed(point, flags | MK_RBUTTON, false, false);
+ ProcessMousePressed(point, flags | MK_RBUTTON, false);
}
void WidgetWin::OnRButtonUp(UINT flags, const CPoint& point) {
@@ -667,7 +667,7 @@ void WidgetWin::OnRButtonUp(UINT flags, const CPoint& point) {
}
void WidgetWin::OnRButtonDblClk(UINT flags, const CPoint& point) {
- ProcessMousePressed(point, flags | MK_RBUTTON, true, false);
+ ProcessMousePressed(point, flags | MK_RBUTTON, true);
}
void WidgetWin::OnSettingChange(UINT flags, const wchar_t* section) {
@@ -718,21 +718,16 @@ void WidgetWin::TrackMouseEvents(DWORD mouse_tracking_flags) {
}
}
-bool WidgetWin::ProcessMousePressed(const CPoint& point,
- UINT flags,
- bool dbl_click,
- bool non_client) {
+bool WidgetWin::ProcessMousePressed(const CPoint& point, UINT flags,
+ bool dbl_click) {
last_mouse_event_was_move_ = false;
// Windows gives screen coordinates for nonclient events, while the RootView
// expects window coordinates; convert if necessary.
gfx::Point converted_point(point);
- if (non_client)
- View::ConvertPointToView(NULL, root_view_.get(), &converted_point);
MouseEvent mouse_pressed(Event::ET_MOUSE_PRESSED,
converted_point.x(),
converted_point.y(),
(dbl_click ? MouseEvent::EF_IS_DOUBLE_CLICK : 0) |
- (non_client ? MouseEvent::EF_IS_NON_CLIENT : 0) |
Event::ConvertWindowsFlags(flags));
if (root_view_->OnMousePressed(mouse_pressed)) {
is_mouse_down_ = true;