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

Unified Diff: chrome/browser/ui/views/panels/panel_view.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: RenderText fixup 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: chrome/browser/ui/views/panels/panel_view.cc
diff --git a/chrome/browser/ui/views/panels/panel_view.cc b/chrome/browser/ui/views/panels/panel_view.cc
index 37dc2271d1a763b44684f3f4c831f1aff3aa149d..7238b69fca39cd98fc3efee76838f8309a5eac28 100644
--- a/chrome/browser/ui/views/panels/panel_view.cc
+++ b/chrome/browser/ui/views/panels/panel_view.cc
@@ -767,10 +767,8 @@ bool PanelView::OnTitlebarMouseDragged(const gfx::Point& mouse_location) {
if (!mouse_pressed_)
return false;
- int delta_x = mouse_location.x() - last_mouse_location_.x();
- int delta_y = mouse_location.y() - last_mouse_location_.y();
if (mouse_dragging_state_ == NO_DRAGGING &&
- ExceededDragThreshold(delta_x, delta_y)) {
+ ExceededDragThreshold(mouse_location - last_mouse_location_)) {
// When a drag begins, we do not want to the client area to still receive
// the focus. We do not need to do this for the unfocused minimized panel.
if (!panel_->IsMinimized()) {

Powered by Google App Engine
This is Rietveld 408576698