Make sure our window has mouse focus before processing raw input events.

This happens rarely, but not reproducibly, where we get raw input events for the window even though it doesn't have focus.
This commit is contained in:
Sam Lantinga 2013-12-27 10:18:18 -08:00
parent a7694dea9a
commit 95c34dcdd1

View file

@ -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;
}