sdl2-compat: Compare the window.event parameters instead of window.type when removing superseded window events

From 0603c7fd0d806b9a71d9f6d405a03537fef7148d Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Mon, 21 Oct 2024 11:29:38 -0400
Subject: [PATCH] Compare the window.event parameters instead of window.type
 when removing 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.
---
 src/sdl2_compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 2b95b66..fec7f25 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -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;