Return early if dragging, unindent the rest
This commit is contained in:
@@ -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)
|
||||
@@ -399,7 +402,6 @@ KeyboardLayoutView::MouseMoved(BPoint point, uint32 transit,
|
||||
fKeyState[key->code / 8] &= ~(1 << (7 - (key->code & 7)));
|
||||
_InvalidateKey(key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user