diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index f65986656..857b939e3 100644 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -441,18 +441,22 @@ void WindowImplWin32::ProcessEvent(UINT message, WPARAM wParam, LPARAM lParam) // Resize event case WM_SIZE : { - // Update window size - RECT rectangle; - GetClientRect(myHandle, &rectangle); - myWidth = rectangle.right - rectangle.left; - myHeight = rectangle.bottom - rectangle.top; + // Ignore size events triggered by a minimize (size == 0 in this case) + if (wParam != SIZE_MINIMIZED) + { + // Update window size + RECT rectangle; + GetClientRect(myHandle, &rectangle); + myWidth = rectangle.right - rectangle.left; + myHeight = rectangle.bottom - rectangle.top; - Event event; - event.Type = Event::Resized; - event.Size.Width = myWidth; - event.Size.Height = myHeight; - PushEvent(event); - break; + Event event; + event.Type = Event::Resized; + event.Size.Width = myWidth; + event.Size.Height = myHeight; + PushEvent(event); + break; + } } // Gain focus event