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 <[email protected]> Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
fdbbdccc05
commit
85ab8ef650
@@ -375,7 +375,8 @@ 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) {
|
||||||
TRACE("TouchpadMovement: tap gesture timed out\n");
|
if (fTapStarted)
|
||||||
|
TRACE("TouchpadMovement: tap gesture timed out\n");
|
||||||
fTapStarted = false;
|
fTapStarted = false;
|
||||||
if (!fDoubleClick
|
if (!fDoubleClick
|
||||||
|| (movement->timestamp - fTapTime) > 2 * fTapTimeOUT) {
|
|| (movement->timestamp - fTapTime) > 2 * fTapTimeOUT) {
|
||||||
@@ -495,7 +496,8 @@ TouchpadMovement::_NoTouchToMovement(touch_event *event,
|
|||||||
{
|
{
|
||||||
uint32 buttons = event->buttons;
|
uint32 buttons = event->buttons;
|
||||||
|
|
||||||
TRACE("TouchpadMovement: no touch event\n");
|
if (fMovementStarted)
|
||||||
|
TRACE("TouchpadMovement: no touch event\n");
|
||||||
|
|
||||||
fScrollingStarted = false;
|
fScrollingStarted = false;
|
||||||
fMovementStarted = 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 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:
|
||||||
|
|||||||
Reference in New Issue
Block a user