[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" CPPFLAGS="$CPPFLAGS $CFLAGS"
;; ;;
esac esac
SYSTYPE=WIN32
fi fi
SYSTYPE=WIN32
AC_DEFINE(NEED_GNUPRINTF) AC_DEFINE(NEED_GNUPRINTF)
endian="little" endian="little"
;; ;;

View file

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