WM_ACTIVATE default processing should set window focus.

Should fix focus problems in non-managed mode.
This commit is contained in:
Ove Kaaven 1999-02-12 12:44:53 +00:00 committed by Alexandre Julliard
parent 4a8639cc4b
commit 1fd63057ad
1 changed files with 8 additions and 1 deletions

View File

@ -225,9 +225,16 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
return (LOWORD(lParam) == HTCAPTION) ? MA_NOACTIVATE : MA_ACTIVATE;
case WM_ACTIVATE:
if (LOWORD(wParam) != WA_INACTIVE)
/* The default action in Windows is to set the keyboard focus to
* the window, if it's being activated and not minimized */
if (LOWORD(wParam) != WA_INACTIVE) {
/* I don't know who put this SetWindowPos here, it does not
* seem very logical to have it here... (FIXME?) */
SetWindowPos32(wndPtr->hwndSelf, HWND_TOP, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE);
if (!(wndPtr->dwStyle & WS_MINIMIZE))
SetFocus32(wndPtr->hwndSelf);
}
break;
case WM_ERASEBKGND: