# SDL: Don't send a resize event when the window is resized to the dock icon

**URL:** <https://discourse.libsdl.org/t/sdl-dont-send-a-resize-event-when-the-window-is-resized-to-the-dock-icon/38177>\
**Category:** SDL Commits\
**Created:** [August 11, 2022, 3:56pm UTC](https://discourse.libsdl.org/t/sdl-dont-send-a-resize-event-when-the-window-is-resized-to-the-dock-icon/38177 "2022-08-11T15:56:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [August 11, 2022, 3:56pm UTC](https://discourse.libsdl.org/t/sdl-dont-send-a-resize-event-when-the-window-is-resized-to-the-dock-icon/38177/1 "2022-08-11T15:56:02Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/a1e34b5e35bd6db929ec2faf932a988f63cd11b6>
>
> Partially addresses https://github.com/libsdl-org/SDL/issues/6033

```diff
From a1e34b5e35bd6db929ec2faf932a988f63cd11b6 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 11 Aug 2022 08:52:51 -0700
Subject: [PATCH] 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
---
 src/video/windows/SDL_windowsevents.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index 6f21b2343a2..aa29da1579f 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;
             }

```
