Cursor can get stuck in resize mode
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 9.7k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
On mac, when using a custom cursor it is possible to get the cursor stuck in 'resize' mode when dragging outside of the window.
I'm not totally sure what's going on here, but our particular way of handling cursors on mac is pretty crude; the normal way would be to use things like tracking areas ([as documented here](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/MouseTrackingEvents/MouseTrackingEvents.html#//apple_ref/doc/uid/10000060i-CH11)) but we take a pretty brute-force approach, and just set the global cursor object anytime the mouse moves.
This particular problem occurs when we're setting a custom cursor during a drag that moves outside of the window; the cursor will often change to the resize indicator and then not change back until the drag is over and the mouse has moved again:

I'm going to try and avoid diving into this too deeply right now, but wanted to at least have an issue open.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the macOS cursor handling described in the issue, especially the global cursor updates during mouse movement and dragging outside the window. Reproduce the custom-cursor drag scenario shown in the report; done means the cursor leaves resize mode without requiring another mouse movement after the drag ends.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100