Commit 829e15a49079ef22eeb69f6fa19b41889312ebda

Esme Povirk 2022-02-05T14:38:39

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index 5923632..0619f67 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;