Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HID: wacom: Set invert_state when either 'Eraser' or 'Invert' usage i…
…s set Microsoft defines two slightly different behaviors for pens that are being used to erase. The first one, for pens that can be used while inverted specifies that both 'Invert' and 'Eraser' usages should be set while the pen is in contact and erasing. For pens that use an eraser button though, they they specify that only the 'Eraser' usage should be set (while hovering, only the 'Invert' usage is to be set). We use our internal 'invert_state' flag to determine if a pen has an intent to erase (whether hovering or not). Right now that flag only depends on the 'Invert' usage, which is sufficient for the first type of pen (i.e. EMR), but not the second type (i.e. AES). This commit updates the logic so that 'invert_state' will be set whenever either of the two usages are. This should ensure that userspace gets the correct BTN_TOOL_PEN / BTN_TOOL_RUBBER indication for AES pens. Link: https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
- Loading branch information