Mercurial > sdl-ios-xcode
changeset 4470:a5878b271b74
Fixed mouse focus window reporting
FIXME: Should the window be a parameter to the mouse events again?
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 17 Jun 2010 12:33:05 -0700 |
parents | f67139f6d87f |
children | 11cedc036ca1 |
files | src/video/win32/SDL_win32events.c |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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;