Author: tkreuzer Date: Thu Jan 11 02:48:02 2007 New Revision: 25422
URL: http://svn.reactos.org/svn/reactos?rev=25422&view=rev Log: Don't remove keyboard focus from any other window than the one that was disabled.
Modified: trunk/reactos/dll/win32/user32/windows/input.c
Modified: trunk/reactos/dll/win32/user32/windows/input.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/in... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/input.c (original) +++ trunk/reactos/dll/win32/user32/windows/input.c Thu Jan 11 02:48:02 2007 @@ -347,9 +347,12 @@ } 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);