Commit a1e34b5e35bd6db929ec2faf932a988f63cd11b6

Sam Lantinga 2022-08-11T08:52:51

Don't send a resize event when the window is resized to the dock icon Partially addresses https://github.com/libsdl-org/SDL/issues/6033

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index 6f21b23..aa29da1 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -1168,6 +1168,11 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
                 break;
             }
 
+            /* When the window is minimized it's resized to the dock icon size, ignore this */
+            if ((data->window->flags & SDL_WINDOW_MINIMIZED) != 0) {
+                break;
+            }
+
             if (!GetClientRect(hwnd, &rect) || IsRectEmpty(&rect)) {
                 break;
             }