Commit 8840de14 authored by Sam Lantinga's avatar Sam Lantinga

Fixed mouse focus window reporting

FIXME: Should the window be a parameter to the mouse events again?
parent 82f6decc
......@@ -176,23 +176,24 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
returnCode = 0;
break;
case WM_MOUSEMOVE:
case WM_MOUSEMOVE:
SDL_SetMouseFocus(data->window);
SDL_SendMouseMotion(0, LOWORD(lParam), HIWORD(lParam));
break;
case WM_LBUTTONDOWN:
SDL_SetMouseFocus(data->window);
SDL_SendMouseButton(SDL_PRESSED, SDL_BUTTON_LEFT);
break;
case WM_LBUTTONUP:
SDL_SetMouseFocus(data->window);
SDL_SendMouseButton(SDL_RELEASED, SDL_BUTTON_LEFT);
break;
case WM_MOUSELEAVE:
{
if (SDL_GetMouseFocus() == data->window) {
SDL_SetMouseFocus(NULL);
}
if (SDL_GetMouseFocus() == data->window) {
SDL_SetMouseFocus(NULL);
}
returnCode = 0;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment