src/video/windows/SDL_windowsevents.c
changeset 8035 2cc220c7e899
parent 7975 1b49b680f319
child 8036 d485906bd74a
     1.1 --- a/src/video/windows/SDL_windowsevents.c	Wed Nov 27 10:29:27 2013 -0800
     1.2 +++ b/src/video/windows/SDL_windowsevents.c	Wed Nov 27 10:29:32 2013 -0800
     1.3 @@ -496,10 +496,12 @@
     1.4  #ifdef WM_MOUSELEAVE
     1.5      case WM_MOUSELEAVE:
     1.6          if (SDL_GetMouseFocus() == data->window && !SDL_GetMouse()->relative_mode) {
     1.7 -            POINT cursorPos;
     1.8 -            GetCursorPos(&cursorPos);
     1.9 -            ScreenToClient(hwnd, &cursorPos);
    1.10 -            SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y);
    1.11 +            if (!IsIconic(hwnd)) {
    1.12 +                POINT cursorPos;
    1.13 +                GetCursorPos(&cursorPos);
    1.14 +                ScreenToClient(hwnd, &cursorPos);
    1.15 +                SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y);
    1.16 +            }
    1.17              SDL_SetMouseFocus(NULL);
    1.18          }
    1.19          returnCode = 0;