SDL: Fixed detecting focus change to child dialogs

From 957c48b4c770b7b8cf893d366150b7dc0b0a44e9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 7 Jan 2022 10:58:04 -0800
Subject: [PATCH] Fixed detecting focus change to child dialogs

Fixes https://github.com/libsdl-org/SDL/issues/5157
---
 src/video/windows/SDL_windowsevents.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index 6cb93998c45..471bbee8671 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -695,6 +695,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
     case WM_SETFOCUS:
     case WM_KILLFOCUS:
+    case WM_ENTERIDLE:
         {
             /* Update the focus in case it's changing between top-level windows in the same application */
             WIN_UpdateFocus(data->window);