src/video/windows/SDL_windowsevents.c
changeset 7275 0a6b3b998814
parent 7191 75360622e65f
child 7276 37814e7eeff3
     1.1 --- a/src/video/windows/SDL_windowsevents.c	Wed Jun 05 07:22:45 2013 -0700
     1.2 +++ b/src/video/windows/SDL_windowsevents.c	Wed Jun 05 12:00:15 2013 -0700
     1.3 @@ -446,14 +446,11 @@
     1.4  
     1.5  #ifdef WM_MOUSELEAVE
     1.6      case WM_MOUSELEAVE:
     1.7 -        if (SDL_GetMouseFocus() == data->window) {
     1.8 -            if (!SDL_GetMouse()->relative_mode) {
     1.9 -                POINT cursorPos;
    1.10 -                GetCursorPos(&cursorPos);
    1.11 -                ScreenToClient(hwnd, &cursorPos);
    1.12 -                SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y);
    1.13 -            }
    1.14 -
    1.15 +        if (SDL_GetMouseFocus() == data->window && !SDL_GetMouse()->relative_mode) {
    1.16 +            POINT cursorPos;
    1.17 +            GetCursorPos(&cursorPos);
    1.18 +            ScreenToClient(hwnd, &cursorPos);
    1.19 +            SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y);
    1.20              SDL_SetMouseFocus(NULL);
    1.21          }
    1.22          returnCode = 0;