linebender / glazier

Deprecated Rust Window Creation Library
Apache License 2.0
206 stars 32 forks source link

windows: Use `Rc` with `HCURSOR`. #146

Closed waywardmonkeys closed 1 year ago

waywardmonkeys commented 1 year ago

The Cursor isn't Send / Sync, so this can just use Rc.

Since HCURSOR isn't Send / Sync, it wasn't valid to use Arc with it. This generates a clippy warning starting in Rust 1.72.

Fixes #138.

DJMcNab commented 1 year ago

It's unfortunate to lose Cursor being Send - because the normal, non custom variants should still be able to be sent around. This would be solved by #136 however

We do need a test that Cursor is consistently not Send (i.e. on all platforms), like we have for Window

xStrom commented 1 year ago

As discussed during office hours, let's move this forward to satisfy clippy and I'll document the lack of Send concern in another issue.

Next steps:

waywardmonkeys commented 1 year ago

Rebased, force-pushed, and marked as ready for review!