src/video/win32/SDL_win32events.c
changeset 3256 83c87f2b2aab
parent 3253 5d7ef5970073
child 3260 85bf3f297b5c
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) &&