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 committed Aug 30, 2023
1 parent 3c4d4b7 commit 20a16f6
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 @@ -147,7 +147,7 @@ static GET_POINTER_PEN_INFO: Lazy<Option<GetPointerPenInfo>> =
/// 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 @@ -2370,7 +2370,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 20a16f6

Please sign in to comment.