comparison 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
comparison
equal deleted inserted replaced
3255:f8a4214ce90a 3256:83c87f2b2aab
526 RECT rect; 526 RECT rect;
527 int x, y; 527 int x, y;
528 int w, h; 528 int w, h;
529 Uint32 window_flags; 529 Uint32 window_flags;
530 530
531 GetClientRect(hwnd, &rect); 531 if (!GetClientRect(hwnd, &rect) ||
532 (rect.right == rect.left && rect.bottom == rect.top)) {
533 break;
534 }
532 ClientToScreen(hwnd, (LPPOINT) & rect); 535 ClientToScreen(hwnd, (LPPOINT) & rect);
533 ClientToScreen(hwnd, (LPPOINT) & rect + 1); 536 ClientToScreen(hwnd, (LPPOINT) & rect + 1);
534 537
535 window_flags = SDL_GetWindowFlags(data->windowID); 538 window_flags = SDL_GetWindowFlags(data->windowID);
536 if ((window_flags & SDL_WINDOW_INPUT_GRABBED) && 539 if ((window_flags & SDL_WINDOW_INPUT_GRABBED) &&