mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
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:
parent
11f6279e11
commit
b2c4c0e76e
1 changed files with 5 additions and 2 deletions
|
@ -347,9 +347,12 @@ EnableWindow(HWND hWnd,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Remove keyboard focus from that window */
|
|
||||||
SetFocus(NULL);
|
|
||||||
Style |= WS_DISABLED;
|
Style |= WS_DISABLED;
|
||||||
|
/* Remove keyboard focus from that window if it had focus */
|
||||||
|
if (hWnd == GetFocus())
|
||||||
|
{
|
||||||
|
SetFocus(NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
NtUserSetWindowLong(hWnd, GWL_STYLE, Style, FALSE);
|
NtUserSetWindowLong(hWnd, GWL_STYLE, Style, FALSE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue