Ensure the active window gains the keyboard focus

(cherry picked from commit 669ce39f95)
This commit is contained in:
Chia-Hsiang Cheng 2023-08-12 16:35:44 +08:00 committed by Rémi Verschelde
parent bf98ff67c6
commit 02c26e075b
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -3014,6 +3014,10 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
if (wParam != WA_INACTIVE) {
track_mouse_leave_event(hWnd);
if (!IsIconic(hWnd)) {
SetFocus(hWnd);
}
}
return 0; // Return to the message loop.
} break;