input mouse: Only save last valid processed movements
Only store the last valid touchpad movement checking status result. Prevously, invalid data provided by drivers and wrongly processed by userspace movement maker functionality such are uninitilised or other kind of garbage data could end up being stored as legit resulting on many unintended misbehaviours. Change-Id: If5888341d53405810bc7295d4fffa1f00c9482fe Reviewed-on: https://review.haiku-os.org/c/haiku/+/9904 Reviewed-by: waddlesplash <[email protected]> Tested-by: Commit checker robot <[email protected]> Reviewed-by: nephele nephele <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
ceb063d041
commit
9c5da6de53
@@ -450,9 +450,10 @@ MouseDevice::_ControlThread()
|
||||
}
|
||||
|
||||
if (read.event == MS_READ_TOUCHPAD) {
|
||||
lastTouchpadMovement = read.u.touchpad;
|
||||
status = fTouchpadMovementMaker.EventToMovement(&read.u.touchpad,
|
||||
&movements, touchpadEventTimeout);
|
||||
if (status == B_OK)
|
||||
lastTouchpadMovement = read.u.touchpad;
|
||||
} else if (read.event == MS_READ) {
|
||||
movements = read.u.mouse;
|
||||
touchpadEventTimeout = -1;
|
||||
|
||||
Reference in New Issue
Block a user