Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscelaneous fixups #348

Merged
merged 5 commits into from
Aug 8, 2024
Merged

Conversation

jigpu
Copy link
Member

@jigpu jigpu commented Aug 8, 2024

This pull request provides fixes for a few things that I had noticed while working on another set of patches.

jigpu added 5 commits August 8, 2024 09:49
The usbInitToolType function uses `deriveDeviceTypeFromButtonEvent` as
a fallback when it cannot otherwise discover the type of tool being
reported in a packet of kernel events. This fallback was intended
to be called for each event in the packet by iterating over the
`event_ptr` array. The loop is incorrectly implemented, however. Before
we get to this point, the value of `event_ptr` would have already been
incremented to the end of the list by the deviceTypeFromEvent loop.
This means our calls to deriveDeviceTypeFromButtonEvent are accessing
data beyond the valid list of events and possibly even beyond the end
of the array.

To fix this, we can replace the pointer arithmetic in both loops with
array index notation instead.

Fixes: 3eacea1 ("Attempt to derive the tool type from a known button/key event")
Signed-off-by: Jason Gerecke <[email protected]>
High-res events are "expected" from the kernel going forward. We may not
support doing anything with them, but we also shouldn't clutter the logs
with error messages.

Signed-off-by: Jason Gerecke <[email protected]>
Misplaced newline causes logs some logs to get intermingled.
Whichever log follows this one becomes part of the same entry.

Signed-off-by: Jason Gerecke <[email protected]>
Remove documentation for parameters that are no longer present.

Signed-off-by: Jason Gerecke <[email protected]>
Updates documentation for some of the button-like parameters. The man
page for xsetwacom now lists all button-like parameters and the help
page now describes the 2nd absolute wheel properly.

Signed-off-by: Jason Gerecke <[email protected]>
@Pinglinux Pinglinux merged commit 7722f2e into linuxwacom:master Aug 8, 2024
13 checks passed
@Pinglinux
Copy link
Member

Patchset LGTM. Thank you, Jason!

@Joshua-Dickens
Copy link
Member

LGTM, I don't see anything that sticks out as a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants