Skip to content

Commit

Permalink
Compare the window.event parameters instead of window.type when remov…
Browse files Browse the repository at this point in the history
…ing superseded window events

Comparing the type parameters instead of the event parameters ends up ejecting every window event from the queue instead of just the specific ones desired.
  • Loading branch information
Kontrabant committed Oct 21, 2024
1 parent 73575d0 commit 0603c7f
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 0603c7f

Please sign in to comment.