Skip to content

Add support for graphics tablets and styluses via zwp_tablet_v2 - #200

Open
caio-hat wants to merge 1 commit into
emersion:masterfrom
caio-hat:support-tablet-stylus
Open

Add support for graphics tablets and styluses via zwp_tablet_v2#200
caio-hat wants to merge 1 commit into
emersion:masterfrom
caio-hat:support-tablet-stylus

Conversation

@caio-hat

Copy link
Copy Markdown

Closes #189

Overview

This PR implements native support for graphics tablets and active styluses (such as Wacom AES/EMR, MPP, etc.) in slurp by binding and implementing the Wayland zwp_tablet_manager_v2 protocol.

Details

  • Binds zwp_tablet_manager_v2 in the registry handler and associates each wl_seat with a zwp_tablet_seat_v2.
  • Implements zwp_tablet_tool_v2 listeners (proximity_in, proximity_out, down, up, motion, button).
  • Handles cursor-shape-v1 for tablet tools (WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CROSSHAIR) with classic cursor image fallback.
  • Enables seamless click-and-drag selection directly with the pen tip.
  • Maps stylus barrel/secondary buttons to cancel selection (consistent with mouse behavior).

Testing

Tested on hardware with an active stylus (Dell Active Pen PN579X / Wacom AES digitizer) on Hyprland (Wayland). Selecting screen regions directly by dragging the stylus tip works as expected.

Implements zwp_tablet_manager_v2, zwp_tablet_seat_v2 and zwp_tablet_tool_v2
listeners to allow selecting screen regions directly using an active pen
or graphics tablet (Wacom AES/EMR, MPP, etc.).

Fixes: emersion#189
@caio-hat
caio-hat force-pushed the support-tablet-stylus branch from 553bbab to fb6529a Compare August 31, 2026 23:25
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.

Add support for tablets/stylus

1 participant