Ensure the active window gains the keyboard focus

This commit is contained in:
Chia-Hsiang Cheng 2023-08-12 16:35:44 +08:00
parent 4714e95896
commit 669ce39f95

View file

@ -2893,6 +2893,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;