Skip to content

Commit

Permalink
Compare the window event types when removing superseded window events
Browse files Browse the repository at this point in the history
Comparing the type parameters instead of the event parameters ends up blowing away every window event in the queue instead of just the specific ones desired.
  • Loading branch information
Kontrabant committed Oct 21, 2024
1 parent 73575d0 commit 1c0aedb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sdl2_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ RemoveSupercededWindowEvents(void *userdata, SDL2_Event *event)
SDL2_Event *new_event = (SDL2_Event *)userdata;

if (event->type == SDL2_WINDOWEVENT &&
event->window.type == new_event->window.type &&
event->window.event == new_event->window.event &&
event->window.windowID == new_event->window.windowID) {
/* We're about to post a new move event, drop the old one */
return 0;
Expand Down

0 comments on commit 1c0aedb

Please sign in to comment.