Author: jimtabor Date: Thu Feb 12 23:10:10 2015 New Revision: 66239
URL: http://svn.reactos.org/svn/reactos?rev=66239&view=rev Log: [NtUser] - Fix dialog breakage due to r66237.
Modified: trunk/reactos/win32ss/user/ntuser/window.c
Modified: trunk/reactos/win32ss/user/ntuser/window.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/window.... ============================================================================== --- trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] Thu Feb 12 23:10:10 2015 @@ -379,17 +379,29 @@ * be destroying. */ // Rule #1 - if ( ti->MessageQueue->spwndActive == Window || + if ( ti->MessageQueue->spwndActive == Window || // Fixes CORE-106 RegSrv32 exit and return focus to CMD. (ti->MessageQueue->spwndActive == NULL && ti->MessageQueue == IntGetFocusMessageQueue()) ) { co_WinPosActivateOtherWindow(Window); }
+ /* Fixes dialog test test_focus breakage due to r66237 and CMD properties closing and returning focus to CMD */ + if (ti->MessageQueue->spwndFocus == Window) + { + if ((Window->style & (WS_CHILD | WS_POPUP)) == WS_CHILD) + { + co_UserSetFocus(Window->spwndParent); + } + else + { + co_UserSetFocus(NULL); + } + } + if (ti->MessageQueue->CaretInfo->hWnd == UserHMGetHandle(Window)) { co_IntDestroyCaret(ti); } - }
/* @@ -2566,10 +2578,12 @@ co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (WPARAM) hWnd, 0); }
+ /* Hide the window */ if (Window->style & WS_VISIBLE) { if (Window->style & WS_CHILD) { + /* Only child windows receive WM_SHOWWINDOW in DestroyWindow() */ co_WinPosShowWindow(Window, SW_HIDE); } else @@ -3846,7 +3860,6 @@ END_CLEANUP; }
- /* * @implemented */ @@ -3884,7 +3897,6 @@ UserLeave(); END_CLEANUP; } -
/* * @implemented