feat: implement TabletPadButtonEvent support
This pull request adds support for tablet pad button events to the input backend system. It introduces a new trait for tablet pad button events, updates the input event enum to handle these events, and implements the necessary plumbing for the LibinputInputBackend to process tablet pad button events. Backends that do not support tablet pad buttons are updated to use the UnusedEvent type.
Tablet Pad Button Event Support
- Added a new trait
TabletPadButtonEventwith methods for button code and state insrc/backend/input/tablet.rs, along with an implementation for theUnusedEventtype. - Extended the
InputBackendtrait to include an associated type for tablet pad button events. - Updated the
InputEventenum to include a new variantTabletPadButtonfor tablet pad button events.
Libinput Backend Integration
- Implemented
TabletPadButtonEventforevent::tablet_pad::TabletPadButtonEventand integrated event handling for tablet pad button events inLibinputInputBackend. [1] [2] [3]
Backend Compatibility
- Updated the
WinitInputandX11Inputbackends to useUnusedEventfor the new tablet pad button event type to maintain compatibility. [1] [2]
Public API Update
- Added
TabletPadButtonEventto the list of publicly re-exported tablet input types insrc/backend/input/mod.rs.
The reason for this was due to: https://github.com/YaLTeR/niri/pull/2536
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 16.98%. Comparing base (4ecc206) to head (38bce91).
:warning: Report is 2 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #1836 +/- ##
==========================================
- Coverage 19.10% 16.98% -2.12%
==========================================
Files 177 177
Lines 27868 27871 +3
==========================================
- Hits 5324 4734 -590
- Misses 22544 23137 +593
| Flag | Coverage Δ | |
|---|---|---|
| wlcs-buffer | 16.57% <ø> (-0.01%) |
:arrow_down: |
| wlcs-core | ? |
|
| wlcs-output | 6.79% <ø> (-0.01%) |
:arrow_down: |
| wlcs-pointer-input | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Thanks for the contribution!
I'd apprechiate it, if you'd consider also wiring up Ring and Strip events at some point.
I'll see if I can get around to it tonight, thank you