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

Unified Diff: chrome/views/widget_win.cc

Issue 40124: Revert r9953 since it caused regressions like: (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | « chrome/views/widget_win.h ('k') | chrome/views/window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/widget_win.cc
===================================================================
--- chrome/views/widget_win.cc (revision 10904)
+++ chrome/views/widget_win.cc (working copy)
@@ -533,7 +533,7 @@
}
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::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::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 @@
}
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::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 @@
}
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::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::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 @@
}
}
-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;
« no previous file with comments | « chrome/views/widget_win.h ('k') | chrome/views/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698