mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 22:00:04 -04:00
Web: don't overwrite cursor with CursorIcon::Default (#3729)
This commit is contained in:
committed by
Kirill Chibisov
parent
b14d5c0c99
commit
54e974c090
@@ -49,6 +49,7 @@ changelog entry.
|
|||||||
|
|
||||||
- On Web, fix `EventLoopProxy::send_event()` triggering event loop immediately
|
- On Web, fix `EventLoopProxy::send_event()` triggering event loop immediately
|
||||||
when not called from inside the event loop. Now queues a microtask instead.
|
when not called from inside the event loop. Now queues a microtask instead.
|
||||||
|
- On Web, stop overwriting default cursor with `CursorIcon::Default`.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|||||||
@@ -324,7 +324,11 @@ impl Inner {
|
|||||||
match &self.cursor {
|
match &self.cursor {
|
||||||
SelectedCursor::Icon(icon)
|
SelectedCursor::Icon(icon)
|
||||||
| SelectedCursor::Loading { previous: Previous::Icon(icon), .. } => {
|
| SelectedCursor::Loading { previous: Previous::Icon(icon), .. } => {
|
||||||
self.style.set("cursor", icon.name())
|
if let CursorIcon::Default = icon {
|
||||||
|
self.style.remove("cursor")
|
||||||
|
} else {
|
||||||
|
self.style.set("cursor", icon.name())
|
||||||
|
}
|
||||||
},
|
},
|
||||||
SelectedCursor::Loading { previous: Previous::Image(cursor), .. }
|
SelectedCursor::Loading { previous: Previous::Image(cursor), .. }
|
||||||
| SelectedCursor::Image(cursor) => {
|
| SelectedCursor::Image(cursor) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user