From 829e15a49079ef22eeb69f6fa19b41889312ebda Mon Sep 17 00:00:00 2001 From: Esme Povirk Date: Sat, 5 Feb 2022 14:38:39 -0600 Subject: [PATCH] Ignore unknown WM_SIZE types. According to MSDN, we can also get SIZE_MAXHIDE and SIZE_MAXSHOW, based on state changes to other windows. It's not clear under what circumstances this will happen (I saw some docs indicating it may require multiple application windows), but it doesn't seem right to treat them as RESTORED. --- src/video/windows/SDL_windowsevents.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c index 592363206..0619f67dd 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -1167,10 +1167,12 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_MINIMIZED, 0, 0); break; - default: + case SIZE_RESTORED: SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESTORED, 0, 0); break; + default: + break; } } break;