Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug where minimized windows get zero width/height
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 6, 2009
1 parent ce15df5 commit 1d2f8bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/video/win32/SDL_win32events.c
Expand Up @@ -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);

Expand Down

0 comments on commit 1d2f8bb

Please sign in to comment.