# HG changeset patch # User Sam Lantinga # Date 1252249478 0 # Node ID 83c87f2b2aab6bb759c3fdaa1319bdb81963b5fe # Parent f8a4214ce90a8dad433ca3dc60cc7892654098d0 Fixed bug where minimized windows get zero width/height diff -r f8a4214ce90a -r 83c87f2b2aab src/video/win32/SDL_win32events.c --- a/src/video/win32/SDL_win32events.c Sun Sep 06 04:40:54 2009 +0000 +++ b/src/video/win32/SDL_win32events.c Sun Sep 06 15:04:38 2009 +0000 @@ -528,7 +528,10 @@ int w, h; Uint32 window_flags; - GetClientRect(hwnd, &rect); + if (!GetClientRect(hwnd, &rect) || + (rect.right == rect.left && rect.bottom == rect.top)) { + break; + } ClientToScreen(hwnd, (LPPOINT) & rect); ClientToScreen(hwnd, (LPPOINT) & rect + 1);