rust-windowing / rust-windowing/winit

CursorGrabMode does not affect tablet tools

Open
#4,701 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
6.2k
Forks
1.3k
Avg merge
2d 19h
Merged PRs (30d)
9

Description

I am trying out the pen/tablet input support with a pen and tablet.

When I set_cursor_grab to CursorGrabMode::Locked:

  • As expected, moving my mouse around does not move the cursor.
  • However, moving the pen on the tablet does move the cursor around.

I would expect set_cursor_grab to affect the cursor regardless of the input device.
(If the intent is for set_cursor_grab to only affect the cursor when the mouse is in use, it would be nice to have an analogous method to set the grab mode for tablet pens.)

Winit version: 0.31.0-beta.3
Platform: Wayland

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the Window::set_cursor_grab entry point and the Wayland tablet input support mentioned in the report. Reproduce the behavior with a pen and tablet, then trace how CursorGrabMode::Locked is applied to mouse versus pen input. Done means locked mode consistently affects the pen cursor, or the intended separate behavior is clearly established and covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.