mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
sysmouse(4): Fix ums(4)-style T-axis reporting via evdev protocol
- Do not report T-axis wheel events as button presses
- Reverse T-axis to match Linux
- Remove wrong comment. T-axis buttons state should be checked by level not
by edge to allow continuous wheel tilt reporting
Reviewed by: gonzo
Approved by: gonzo (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12676
This commit is contained in:
parent
f3f8069493
commit
d52d8bce16
2 changed files with 6 additions and 6 deletions
|
|
@ -107,11 +107,11 @@ smdev_evdev_write(int x, int y, int z, int buttons)
|
|||
}
|
||||
break;
|
||||
case EVDEV_SYSMOUSE_T_AXIS_UMS:
|
||||
/* XXX: Edge triggering should be used here */
|
||||
if (buttons & (1 << 5))
|
||||
if (buttons & (1 << 6))
|
||||
evdev_push_rel(sysmouse_evdev, REL_HWHEEL, 1);
|
||||
else if (buttons & (1 << 6))
|
||||
else if (buttons & (1 << 5))
|
||||
evdev_push_rel(sysmouse_evdev, REL_HWHEEL, -1);
|
||||
buttons &= ~((1 << 5)|(1 << 6));
|
||||
/* PASSTHROUGH */
|
||||
case EVDEV_SYSMOUSE_T_AXIS_NONE:
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -139,11 +139,11 @@ sysmouse_evdev_store(int x, int y, int z, int buttons)
|
|||
}
|
||||
break;
|
||||
case EVDEV_SYSMOUSE_T_AXIS_UMS:
|
||||
/* XXX: Edge triggering should be used here */
|
||||
if (buttons & (1 << 5))
|
||||
if (buttons & (1 << 6))
|
||||
evdev_push_rel(sysmouse_evdev, REL_HWHEEL, 1);
|
||||
else if (buttons & (1 << 6))
|
||||
else if (buttons & (1 << 5))
|
||||
evdev_push_rel(sysmouse_evdev, REL_HWHEEL, -1);
|
||||
buttons &= ~((1 << 5)|(1 << 6));
|
||||
/* PASSTHROUGH */
|
||||
case EVDEV_SYSMOUSE_T_AXIS_NONE:
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue