Skip to content

Commit

Permalink
make UserEventPlaceholder a new type instead of alias
Browse files Browse the repository at this point in the history
  • Loading branch information
nerditation authored and madsmtm committed Jan 4, 2024
1 parent 757921f commit b6d211c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform_impl/windows/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ use super::{window::set_skip_taskbar, SelectedCursor};
/// as a placeholder so user events can be buffered as usual,
/// the real `UserEvent` is pulled from the mpsc channel directly
/// when the placeholder event is delivered to the event handler
type UserEventPlaceholder = ();
pub(crate) struct UserEventPlaceholder;

// here below, the generic `EventLoopRunnerShared<T>` is replaced with
// `EventLoopRunnerShared<UserEventPlaceholder>` so we can get rid
Expand Down Expand Up @@ -2412,7 +2412,7 @@ unsafe extern "system" fn thread_event_target_callback(
// user event is still in the mpsc channel and will be pulled
// once the placeholder event is delivered to the wrapper
// `event_handler`
userdata.send_event(Event::UserEvent(()));
userdata.send_event(Event::UserEvent(UserEventPlaceholder));
0
}
_ if msg == EXEC_MSG_ID.get() => {
Expand Down

0 comments on commit b6d211c

Please sign in to comment.