Windows: cache custom cursors (#3293)

This commit is contained in:
daxpedda 2024-01-05 17:02:08 +01:00 committed by GitHub
parent 37b6243289
commit 787b2d7362
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 25 deletions

View file

@ -407,10 +407,10 @@ impl Window {
});
}
Cursor::Custom(cursor) => {
let new_cursor = match WinCursor::new(&cursor.inner.0) {
Ok(cursor) => cursor,
Err(err) => {
warn!("Failed to create custom cursor: {err}");
let new_cursor = match cursor.inner {
WinCursor::Cursor(cursor) => cursor,
WinCursor::Failed => {
warn!("Requested to apply failed cursor");
return;
}
};