mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
On Linux under X11, and under XWayland, the X server lists a pen's eraser end as a pointer device of its own, and winit 0.30 hands it to the window as a mouse. Turning the pen over and dragging the eraser end drew with the active tool, for example a Paintbrush stroke. The tablet reader now marks a pen device whose name or XInput type contains "eraser", and Services::stylus carries the pen's end with its pressure. Once a frame while no press is held and the pointer is in the window, the canvas selects the Eraser when the eraser end moves, and it selects the tool used before when the tip moves again. The return goes through Session::switch_tool, so a perspective grid hidden meanwhile stays hidden. A tool chosen while the eraser end stands in stays when the tip comes back. The feed starts afresh when the pen turns over, so a press of one end does not take the pressure the other end last touched with. Native Wayland is unchanged. The switch follows PhotoCraft's sync_eraser_tool (storytold/photocraft#255, and storytold/photocraft#5043 for the cleared tool). Docs: docs/development.md, docs/gaps.md, docs/hardware-parity.md, docs/target-app-parity.md.