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,6 +375,7 @@ TouchpadMovement::EventToMovement(touch_event *event, mouse_movement *movement)
|
|||||||
movement->timestamp = system_time();
|
movement->timestamp = system_time();
|
||||||
|
|
||||||
if ((movement->timestamp - fTapTime) > fTapTimeOUT) {
|
if ((movement->timestamp - fTapTime) > fTapTimeOUT) {
|
||||||
|
if (fTapStarted)
|
||||||
TRACE("TouchpadMovement: tap gesture timed out\n");
|
TRACE("TouchpadMovement: tap gesture timed out\n");
|
||||||
fTapStarted = false;
|
fTapStarted = false;
|
||||||
if (!fDoubleClick
|
if (!fDoubleClick
|
||||||
@ -495,6 +496,7 @@ TouchpadMovement::_NoTouchToMovement(touch_event *event,
|
|||||||
{
|
{
|
||||||
uint32 buttons = event->buttons;
|
uint32 buttons = event->buttons;
|
||||||
|
|
||||||
|
if (fMovementStarted)
|
||||||
TRACE("TouchpadMovement: no touch event\n");
|
TRACE("TouchpadMovement: no touch event\n");
|
||||||
|
|
||||||
fScrollingStarted = false;
|
fScrollingStarted = false;
|
||||||
@ -508,9 +510,10 @@ TouchpadMovement::_NoTouchToMovement(touch_event *event,
|
|||||||
|
|
||||||
// if the movement stopped switch off the tap drag when timeout is expired
|
// if the movement stopped switch off the tap drag when timeout is expired
|
||||||
if ((movement->timestamp - fTapTime) > fTapTimeOUT) {
|
if ((movement->timestamp - fTapTime) > fTapTimeOUT) {
|
||||||
|
if (fTapdragStarted)
|
||||||
|
TRACE("TouchpadMovement: tap drag gesture timed out\n");
|
||||||
fTapdragStarted = false;
|
fTapdragStarted = false;
|
||||||
fValidEdgeMotion = false;
|
fValidEdgeMotion = false;
|
||||||
TRACE("TouchpadMovement: tap drag gesture timed out\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (abs(fTapDeltaX) > 15 || abs(fTapDeltaY) > 15) {
|
if (abs(fTapDeltaX) > 15 || abs(fTapDeltaY) > 15) {
|
||||||
|
@ -612,9 +612,9 @@ synaptics_ioctl(void *_cookie, uint32 op, void *buffer, size_t length)
|
|||||||
|
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case MS_READ:
|
case MS_READ:
|
||||||
TRACE("SYNAPTICS: MS_READ get event\n");
|
|
||||||
if ((status = get_synaptics_movment(cookie, &movement)) != B_OK)
|
if ((status = get_synaptics_movment(cookie, &movement)) != B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
TRACE("SYNAPTICS: MS_READ get event\n");
|
||||||
return user_memcpy(buffer, &movement, sizeof(movement));
|
return user_memcpy(buffer, &movement, sizeof(movement));
|
||||||
|
|
||||||
case MS_IS_TOUCHPAD:
|
case MS_IS_TOUCHPAD:
|
||||||
|
Loading…
Reference in New Issue
Block a user