Skip to content

Conversation

@coleleavitt
Copy link

@coleleavitt coleleavitt commented Oct 6, 2025

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 TabletPadButtonEvent with methods for button code and state in src/backend/input/tablet.rs, along with an implementation for the UnusedEvent type.
  • Extended the InputBackend trait to include an associated type for tablet pad button events.
  • Updated the InputEvent enum to include a new variant TabletPadButton for tablet pad button events.

Libinput Backend Integration

  • Implemented TabletPadButtonEvent for event::tablet_pad::TabletPadButtonEvent and integrated event handling for tablet pad button events in LibinputInputBackend. [1] [2] [3]

Backend Compatibility

  • Updated the WinitInput and X11Input backends to use UnusedEvent for the new tablet pad button event type to maintain compatibility. [1] [2]

Public API Update

  • Added TabletPadButtonEvent to the list of publicly re-exported tablet input types in src/backend/input/mod.rs.

The reason for this was due to: YaLTeR/niri#2536

@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.98%. Comparing base (4ecc206) to head (38bce91).
⚠️ 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%) ⬇️
wlcs-core ?
wlcs-output 6.79% <ø> (-0.01%) ⬇️
wlcs-pointer-input ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

I'd apprechiate it, if you'd consider also wiring up Ring and Strip events at some point.

@coleleavitt
Copy link
Author

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

Copy link
Member

@PolyMeilex PolyMeilex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wayland side of this would be cool to have as well, but just wiring up the events from libinput is definitely a good first step. Thanks!

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.

4 participants