Fixed bug where minimized windows get zero width/height

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403786
This commit is contained in:
Sam Lantinga 2009-09-06 15:04:38 +00:00
parent 56d28e32b9
commit ed007a4d81

View file

@ -528,7 +528,10 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
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);