# HG changeset patch # User Sam Lantinga # Date 1276803185 25200 # Node ID a5878b271b749827bbd996482c71c9e066040eae # Parent f67139f6d87f1f3f9bc7779129e11ee377881ad8 Fixed mouse focus window reporting FIXME: Should the window be a parameter to the mouse events again? diff -r f67139f6d87f -r a5878b271b74 src/video/win32/SDL_win32events.c --- a/src/video/win32/SDL_win32events.c Sun Jun 06 21:09:45 2010 -0700 +++ b/src/video/win32/SDL_win32events.c Thu Jun 17 12:33:05 2010 -0700 @@ -176,23 +176,24 @@ 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;