feat: add graphics tablet support and fix Nix development shell - #166
feat: add graphics tablet support and fix Nix development shell#166dominicegginton wants to merge 3 commits into
Conversation
Implement graphics tablet (digitizer) support via the `wp_tablet_manager_v2` Wayland protocol, enabling high-definition pen input and stylus hover tracking on the infinite canvas. - Initialize `TabletManagerState` on the compositor state and delegate the protocol. - Track physical graphics tablet devices and register tools on hotplug. - Project absolute tablet hardware coordinates to screen coordinates and convert them to absolute world space using the infinite canvas coordinate transforms. - Forward high-definition stylus inputs (tilt, pressure, distance, rotation) to native tablet-aware clients like Krita or GIMP. - Emulate standard pointer buttons and motion for non-tablet-aware legacy apps and server-side window title/border decorations. - Correctly route stylus hover proximity enter/exit states. - Clean up Nix `devShell` definition in `flake.nix` by inheriting inputs from the default package using `inputsFrom = [...]` to guarantee all dev-tools build correctly. - Update user-facing and developer documentation with tablet configuration details.
Introduce a tablet-specific pointer state to track stylus proximity and axis events. When a graphics tablet stylus is active, render a custom procedural dot cursor (a white circle with a black outline) for better precision, and automatically fall back to the standard cursor on mouse or pointer movement. - Add `tablet_active` state to `CursorState` - Procedurally generate `tablet_dot` frames on demand - Toggle `tablet_active` in tablet and pointer input event handlers - Use `tablet_dot` in `build_cursor_elements` when tablet is active
5663fc2 to
dea3d12
Compare
|
@dominicegginton is this still on your radar? No pressure, tablet support is very much wanted (#118) and this draft is the closest thing to it, but it's been idle a few weeks and now conflicts with main. If you've run out of time, just say so and I'll close the draft while keeping #118 open for whoever picks it up -- the branch stays linked there either way. |
|
Hi @malbiruk, I saw your comment. I have a Wacom tablet built into my ThinkPad X1 Yoga and I'm very interested in getting this feature working (as I mentioned in #118). If @dominicegginton is currently unavailable, I would be happy to help out. I have some Rust experience (junior level) and can offer my real hardware for testing. I can pull this branch, resolve the merge conflicts with Let me know if you are open to this approach! |
|
Thanks for the offer, @Shlubka Dom's still on this: he confirmed in #118 he's cleaning the branch up this weekend, so I don't want to reassign it while he's active. The most useful thing right now is what he already invited: pull the pen branch, run it on your Wacom, and report back how pen/pressure/proximity behave on real hardware. That's gold regardless of who lands the code. If it stalls after the weekend, let's revisit ✌️ |
|
I tested the Here are the issues I noticed during ~30 min of testing:
I can provide Do you want me to run more extensive tests (e.g., multi-monitor, different apps, specific transforms)? I'm happy to help. |
|
@Shlubka thank you so much for the feedback. I'll take a look at ensuing I iron out bugs before also getting this into a reviewable state this weekend. |
|
@Shlubka take this if you're still up for it -- it's still at its June 27 commit. Easiest path is a fresh PR from your fork with Dom's three commits rebased onto main; a rebase keeps his authorship as long as you don't squash them. @dominicegginton if you'd rather add Shlubka to your fork so this PR updates in place, even better -- say the word and we'll do that instead. Either way the commits stay yours and you're welcome back anytime. Shlubka, after the rebase: regenerate |
|
I'm still here and very interested in taking this forward. I'll start working on the rebase and fixes this week and will open a fresh PR once it's ready. Thanks for trusting me with this! |
Implement graphics tablet (digitizer) support via the
wp_tablet_manager_v2Wayland protocol, enabling high-definition pen input and stylus hover tracking on the infinite canvas.TabletManagerStateon the compositor state and delegate the protocol.devShelldefinition inflake.nixby inheriting inputs from the default package usinginputsFrom = [...]to guarantee all dev-tools build correctly.see also: #118