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

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 1747803003: MacViews: Implement Tab Dragging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace GCD with DelegateSimpleThread, remove ConstrainToEnclosingRect function, cleanup code. Created 4 years, 8 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: chrome/browser/ui/views/tabs/tab_drag_controller.cc
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index cc8e272a46a9d2ff07d447a846d00f41465985a5..1cb5ce2b4fb98031a347b212f798c7b658cfd76b 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -382,7 +382,10 @@ void TabDragController::Drag(const gfx::Point& point_in_screen) {
&drag_bounds);
widget->SetVisibilityChangedAnimationsEnabled(true);
}
- RunMoveLoop(GetWindowOffset(point_in_screen));
+ // Use the start point to initialize the move loop, otherwise the point
+ // under the cursor will be offset by the drag threshold from where the
+ // user originally clicked, which could be entirely off the window.
+ RunMoveLoop(GetWindowOffset(start_point_in_screen_));
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698