mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
Map UserEvent properly in Event::to_static (#1468)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
- On Wayland, fix color from `close_button_icon_color` not applying.
|
||||
- Ignore locale if unsupported by X11 backend
|
||||
- On Wayland, Add HiDPI cursor support
|
||||
- Fix `Event::to_static` returning `None` for user events.
|
||||
|
||||
# 0.21.0 (2020-02-04)
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ impl<'a, T> Event<'a, T> {
|
||||
WindowEvent { window_id, event } => event
|
||||
.to_static()
|
||||
.map(|event| WindowEvent { window_id, event }),
|
||||
UserEvent(_) => None,
|
||||
UserEvent(event) => Some(UserEvent(event)),
|
||||
DeviceEvent { device_id, event } => Some(DeviceEvent { device_id, event }),
|
||||
NewEvents(cause) => Some(NewEvents(cause)),
|
||||
MainEventsCleared => Some(MainEventsCleared),
|
||||
|
||||
Reference in New Issue
Block a user