X11: cache custom cursors (#3366)

This commit is contained in:
daxpedda 2024-01-17 18:17:49 +01:00 committed by GitHub
parent 6b29253797
commit d1717b6a01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 100 additions and 38 deletions

View file

@ -171,7 +171,7 @@ impl Window {
match attributes.cursor {
Cursor::Icon(icon) => window_state.set_cursor(icon),
Cursor::Custom(cursor) => window_state.set_custom_cursor(&cursor.inner.0),
Cursor::Custom(cursor) => window_state.set_custom_cursor(cursor),
}
// Activate the window when the token is passed.
@ -514,7 +514,7 @@ impl Window {
match cursor {
Cursor::Icon(icon) => window_state.set_cursor(icon),
Cursor::Custom(cursor) => window_state.set_custom_cursor(&cursor.inner.0),
Cursor::Custom(cursor) => window_state.set_custom_cursor(cursor),
}
}