Return early if dragging, unindent the rest

This commit is contained in:
John Scipione
2014-02-20 15:03:39 -05:00
parent c959ce4612
commit 7e9644053f
@@ -349,8 +349,11 @@ KeyboardLayoutView::MouseMoved(BPoint point, uint32 transit,
return;
}
if (fDragKey == NULL && (fabs(point.x - fClickPoint.x) > 4
if (fDragKey != NULL || !(fabs(point.x - fClickPoint.x) > 4
|| fabs(point.y - fClickPoint.y) > 4)) {
return;
}
// start dragging
Key* key = _KeyAt(fClickPoint);
if (key == NULL)
@@ -398,7 +401,6 @@ KeyboardLayoutView::MouseMoved(BPoint point, uint32 transit,
fKeyState[key->code / 8] &= ~(1 << (7 - (key->code & 7)));
_InvalidateKey(key);
}
}