فهرست منبع

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.

Sam Lantinga 11 سال پیش
والد
کامیت
6f6c76a6a5
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/video/windows/SDL_windowsevents.c

+ 1 - 1
src/video/windows/SDL_windowsevents.c

@@ -417,7 +417,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
             RAWINPUT inp;
             RAWINPUT inp;
             UINT size = sizeof(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;
                 break;
             }
             }