diff --git a/CHANGELOG.md b/CHANGELOG.md index 5876b529..ed9baa58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/event.rs b/src/event.rs index 10ab6217..494a4a1d 100644 --- a/src/event.rs +++ b/src/event.rs @@ -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),