diff src/video/win32/SDL_win32events.c @ 3256:83c87f2b2aab

Fixed bug where minimized windows get zero width/height
author Sam Lantinga <slouken@libsdl.org>
date Sun, 06 Sep 2009 15:04:38 +0000
parents 5d7ef5970073
children 85bf3f297b5c
line wrap: on
line diff
--- 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);