ps2 synaptics: don't spam the syslog when nothing happens
Some logs are emitted even when nothing at all is happening, constantly spamming the syslog. Log them only the first time they happen. Change-Id: I81511a7ce245c2141fa3dcd141b2f3732d9b51ad Reviewed-on: https://review.haiku-os.org/c/haiku/+/4424 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
parent
fdbbdccc05
commit
85ab8ef650
@ -375,7 +375,8 @@ TouchpadMovement::EventToMovement(touch_event *event, mouse_movement *movement)
|
||||
movement->timestamp = system_time();
|
||||
|
||||
if ((movement->timestamp - fTapTime) > fTapTimeOUT) {
|
||||
TRACE("TouchpadMovement: tap gesture timed out\n");
|
||||
if (fTapStarted)
|
||||
TRACE("TouchpadMovement: tap gesture timed out\n");
|
||||
fTapStarted = false;
|
||||
if (!fDoubleClick
|
||||
|| (movement->timestamp - fTapTime) > 2 * fTapTimeOUT) {
|
||||
@ -495,7 +496,8 @@ TouchpadMovement::_NoTouchToMovement(touch_event *event,
|
||||
{
|
||||
uint32 buttons = event->buttons;
|
||||
|
||||
TRACE("TouchpadMovement: no touch event\n");
|
||||
if (fMovementStarted)
|
||||
TRACE("TouchpadMovement: no touch event\n");
|
||||
|
||||
fScrollingStarted = false;
|
||||
fMovementStarted = false;
|
||||
@ -508,9 +510,10 @@ TouchpadMovement::_NoTouchToMovement(touch_event *event,
|
||||
|
||||
// if the movement stopped switch off the tap drag when timeout is expired
|
||||
if ((movement->timestamp - fTapTime) > fTapTimeOUT) {
|
||||
if (fTapdragStarted)
|
||||
TRACE("TouchpadMovement: tap drag gesture timed out\n");
|
||||
fTapdragStarted = false;
|
||||
fValidEdgeMotion = false;
|
||||
TRACE("TouchpadMovement: tap drag gesture timed out\n");
|
||||
}
|
||||
|
||||
if (abs(fTapDeltaX) > 15 || abs(fTapDeltaY) > 15) {
|
||||
|
@ -612,9 +612,9 @@ synaptics_ioctl(void *_cookie, uint32 op, void *buffer, size_t length)
|
||||
|
||||
switch (op) {
|
||||
case MS_READ:
|
||||
TRACE("SYNAPTICS: MS_READ get event\n");
|
||||
if ((status = get_synaptics_movment(cookie, &movement)) != B_OK)
|
||||
return status;
|
||||
TRACE("SYNAPTICS: MS_READ get event\n");
|
||||
return user_memcpy(buffer, &movement, sizeof(movement));
|
||||
|
||||
case MS_IS_TOUCHPAD:
|
||||
|
Loading…
Reference in New Issue
Block a user