Explorar o código

Fixed grab handling when focus changes between windows in the same application

Sam Lantinga %!s(int64=4) %!d(string=hai) anos
pai
achega
bfd2f8993f
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      src/video/windows/SDL_windowsevents.c

+ 8 - 0
src/video/windows/SDL_windowsevents.c

@@ -663,6 +663,14 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
         }
         break;
 
+    case WM_SETFOCUS:
+    case WM_KILLFOCUS:
+        {
+            /* Update the focus in case it's changing between windows in the same application */
+            WIN_UpdateFocus(data->window);
+        }
+        break;
+
     case WM_POINTERUPDATE:
         {
             data->last_pointer_update = lParam;