[win] Handle focus in/out events

This fixes the errant console behavior (cursor wasn't showing because QF
thought it had never received focus).
This commit is contained in:
Bill Currie 2021-03-31 02:48:25 +09:00
parent 63e30e6ae0
commit 596cd164a3
2 changed files with 5 additions and 1 deletions

View File

@ -12,8 +12,8 @@ case "$host_os" in
CPPFLAGS="$CPPFLAGS $CFLAGS"
;;
esac
SYSTYPE=WIN32
fi
SYSTYPE=WIN32
AC_DEFINE(NEED_GNUPRINTF)
endian="little"
;;

View File

@ -776,9 +776,13 @@ MainWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
uMsg = WM_MOUSEWHEEL;
switch (uMsg) {
case WM_SETFOCUS:
Key_FocusEvent (1);
break;
case WM_KILLFOCUS:
if (modestate == MS_FULLDIB)
ShowWindow (win_mainwindow, SW_SHOWMINNOACTIVE);
Key_FocusEvent (0);
break;
case WM_CREATE:
break;