Return early if dragging, unindent the rest
This commit is contained in:
@@ -349,8 +349,11 @@ KeyboardLayoutView::MouseMoved(BPoint point, uint32 transit,
|
|||||||
return;
|
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)) {
|
|| fabs(point.y - fClickPoint.y) > 4)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// start dragging
|
// start dragging
|
||||||
Key* key = _KeyAt(fClickPoint);
|
Key* key = _KeyAt(fClickPoint);
|
||||||
if (key == NULL)
|
if (key == NULL)
|
||||||
@@ -398,7 +401,6 @@ KeyboardLayoutView::MouseMoved(BPoint point, uint32 transit,
|
|||||||
|
|
||||||
fKeyState[key->code / 8] &= ~(1 << (7 - (key->code & 7)));
|
fKeyState[key->code / 8] &= ~(1 << (7 - (key->code & 7)));
|
||||||
_InvalidateKey(key);
|
_InvalidateKey(key);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user