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

Unified Diff: ui/views/controls/table/table_view_win.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix step one more time Created 8 years, 2 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
Index: ui/views/controls/table/table_view_win.cc
diff --git a/ui/views/controls/table/table_view_win.cc b/ui/views/controls/table/table_view_win.cc
index 1538dd858402934b0c0389869c25a02097104eb2..e8becd281452bc8e68eb7aae27b84924dd73e741 100644
--- a/ui/views/controls/table/table_view_win.cc
+++ b/ui/views/controls/table/table_view_win.cc
@@ -709,9 +709,9 @@ LRESULT CALLBACK TableView::TableWndProc(HWND window,
case WM_MOUSEMOVE: {
if (in_mouse_down) {
- int x = GET_X_LPARAM(l_param);
- int y = GET_Y_LPARAM(l_param);
- if (View::ExceededDragThreshold(x - mouse_down_x, y - mouse_down_y)) {
+ gfx::Point mouse_pos(GET_X_LPARAM(l_param), GET_Y_LPARAM(l_param));
+ gfx::Point mouse_down_pos(mouse_down_x, mouse_down_y);
Peter Kasting 2012/10/31 01:04:41 Nit: Convert mouse_down_x/mouse_down_y from a pair
danakj 2012/10/31 16:55:46 Oh, fancy.
+ if (View::ExceededDragThreshold(mouse_pos - mouse_down_pos)) {
// We're about to start drag and drop, which results in no mouse up.
// Release capture and reset state.
ReleaseCapture();

Powered by Google App Engine
This is Rietveld 408576698