Commit 957c48b4c770b7b8cf893d366150b7dc0b0a44e9

Sam Lantinga 2022-01-07T10:58:04

Fixed detecting focus change to child dialogs Fixes https://github.com/libsdl-org/SDL/issues/5157

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index 6cb9399..471bbee 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);