Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • L libinput
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 161
    • Issues 161
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 17
    • Merge requests 17
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libinput
  • libinput
  • Merge requests
  • !724

tablet: handle a BTN_TOOL_PEN on top of BTN_TOOL_RUBBER

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Peter Hutterer requested to merge whot/libinput:wip/wacom-tool-pen-confusion into main Nov 17, 2021
  • Overview 2
  • Commits 3
  • Pipelines 5
  • Changes 5

The Wacom 524C device triggers a kernel bug in the InRange and Invert handling. Every time BTN_TOUCH is set/unset the device also sets/unsets BTN_TOOL_PEN even when we nominally have the eraser in proximity.

The event sequence effectively looks like this:

# on prox in
BTN_TOOL_RUBBER 1
-- SYN_REPORT ---
# on tip down
BTN_TOOL_PEN 1
BTN_TOUCH 1
-- SYN_REPORT ---
# on tip up
BTN_TOUCH 0
BTN_TOOL_PEN 0
-- SYN_REPORT ---
# on prox out
BTN_TOOL_RUBBER 1
-- SYN_REPORT ---

To work around this, bias our duplicate tool detection code towards the eraser - if we have an eraser in-prox already and the pen goes in-prox, ignore it and continue with the eraser. But if we have a pen in-prox and the eraser goes in-prox as well, force a prox-out for the pen and put the eraser in-prox.

Recording originally from https://github.com/linuxwacom/xf86-input-wacom/issues/186

cc @bentiss, @pinglinux, @jigpu

This sits on top of !723 (merged), only the top commit matters here

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/wacom-tool-pen-confusion