Skip to content

Commit

Permalink
Make sure our window has mouse focus before processing raw input events.
Browse files Browse the repository at this point in the history
This happens rarely, but not reproducibly, where we get raw input events for the window even though it doesn't have focus.
  • Loading branch information
slouken committed Dec 27, 2013
1 parent 2777931 commit 6f6c76a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/windows/SDL_windowsevents.c
Expand Up @@ -417,7 +417,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
RAWINPUT inp;
UINT size = sizeof(inp);

if (!mouse->relative_mode || mouse->relative_mode_warp) {
if (!mouse->relative_mode || mouse->relative_mode_warp || mouse->focus != data->window) {
break;
}

Expand Down

0 comments on commit 6f6c76a

Please sign in to comment.