Closed waywardmonkeys closed 1 year ago
That lint is coming in 1.72, so not all that far away in time...
I'd be most inclined to just make Cursor
not be Send/Sync
, and so use Rc
here. Especially if we migrate to https://github.com/rust-windowing/cursor-icon as mentioned in #136, that can be passed around as the Sync version if people need it.
That matches the rest of our API, and the custom cursor variants are completely useless not on the main thread anyway.
If no one says otherwise, I'll tackle this sometime this week.
Running a nightly clippy, this gets emitted:
Maybe the check is wrong, I haven't looked.
The X11 code is the only one other backend with an interesting
CustomCursor
impl (non-empty), but it doesn't seem to care about threads or refcounting. So I'm curious what the threading model is here...