linebender / linebender/druid

Cursor can get stuck in resize mode

Open
#1,454 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug shell/mac
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:

![2020-12-11 13 32 36](https://user-images.githubusercontent.com/3330916/101941063-756b0780-3bb5-11eb-8bfc-7a360e5738f6.gif)

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.