Skip to content

Commit

Permalink
ums(4): fix incorrect mouse button press using evdev.
Browse files Browse the repository at this point in the history
  • Loading branch information
laffer1 committed Sep 20, 2024
1 parent 61f33ac commit 01ab70f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sys/dev/usb/input/ums.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,13 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t error)
if (++info != &sc->sc_info[UMS_INFO_MAX])
goto repeat;


/* keep old button value(s) for non-detected buttons */
buttons |= sc->sc_status.button & ~buttons_found;

#ifdef EVDEV_SUPPORT
buttons_reported = buttons;
#endif
/* keep old button value(s) for non-detected buttons */
buttons |= sc->sc_status.button & ~buttons_found;

if (dx || dy || dz || dt || dw ||
(buttons != sc->sc_status.button)) {
Expand Down

0 comments on commit 01ab70f

Please sign in to comment.