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 eraser status when either 'Eraser' or 'Invert' usage …
…is 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 specify that only the 'Eraser' usage should be set (while hovering, only the 'Invert' usage is to be set). We used our internal 'invert_state' flag to determine if a pen has an intent to erase (whether hovering or not). That flag was previously only depending on the 'Invert' usage, which was sufficient for the first type of pen (EMR) but not the second type (AES). This commit makes the flag depend on either usage being set, and also renames it to make its function more clear. This should not normally have an impact on userspace since we determine the tool type (e.g. BTN_TOOL_RUBBER) only when a device first enters range, and keep the type fixed for the remainder of the interaction. This would only improve reporting in the situation where the first event in an interaction comes from an AES pen that is already in contact with the screen when its eraser button is pressed. Link: https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states Signed-off-by: Jason Gerecke <[email protected]>
- Loading branch information