Don't remove keyboard focus from any other window than the one that was disabled.

svn path=/trunk/; revision=25422
This commit is contained in:
Timo Kreuzer 2007-01-10 23:48:02 +00:00
parent 11f6279e11
commit b2c4c0e76e

View file

@ -347,9 +347,12 @@ EnableWindow(HWND hWnd,
}
else
{
/* Remove keyboard focus from that window */
SetFocus(NULL);
Style |= WS_DISABLED;
/* Remove keyboard focus from that window if it had focus */
if (hWnd == GetFocus())
{
SetFocus(NULL);
}
}
NtUserSetWindowLong(hWnd, GWL_STYLE, Style, FALSE);