Fixed bug where minimized windows get zero width/height

This commit is contained in:
Sam Lantinga
2009-09-06 15:04:38 +00:00
parent b6ec478790
commit eb0575b20a

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);