From be51a15ba2079e6449a169e8b8ddb559c798b15d Mon Sep 17 00:00:00 2001
From: quasar32 <[EMAIL REDACTED]>
Date: Sat, 22 Aug 2026 00:01:05 -0500
Subject: [PATCH] Hit test no longer executes when destroying wayland window
Signed-off-by: quasar32 <fontejam32@gmail.com>
---
src/video/wayland/SDL_waylandwindow.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 3f7b88c53a397..7ca58cd8f12e6 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -3735,6 +3735,8 @@ void Wayland_DestroyWindow(SDL_VideoDevice *_this, SDL_Window *window)
* no internal structures are left pointing to the destroyed window.
*/
if (wind->show_hide_sync_required) {
+ /* Make sure hit test isn't executed during roundtrip */
+ window->hit_test = NULL;
WAYLAND_wl_display_roundtrip(data->display);
}