Author: jimtabor
Date: Mon Aug 20 03:59:24 2012
New Revision: 57113
URL:
http://svn.reactos.org/svn/reactos?rev=57113&view=rev
Log:
[NtUser]
- Fix API SetActiveWindow test, get it back.
Modified:
trunk/reactos/win32ss/user/ntuser/focus.c
Modified: trunk/reactos/win32ss/user/ntuser/focus.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/focus.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/focus.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/focus.c [iso-8859-1] Mon Aug 20 03:59:24 2012
@@ -591,13 +591,14 @@
if (bFocus && !(ThreadQueue->QF_flags & QF_FOCUSNULLSINCEACTIVE))
{
/* Do not change focus if the window is no longer active */
- if ( !Wnd || IntGetNonChildAncestor(ThreadQueue->spwndFocus) !=
ThreadQueue->spwndActive)
- {
- PWND pWndTemp = Wnd;
- if (ThreadQueue->spwndActive && ThreadQueue->spwndActive->style
& WS_MINIMIZE)
- pWndTemp = NULL;
- TRACE("SAW is setting Focus! 0x%p Temp 0x%p\n",Wnd, pWndTemp);
- IntSendFocusMessages(pti, pWndTemp);
+ if (ThreadQueue->spwndActive == Wnd)
+ {
+ if (!ThreadQueue->spwndFocus ||
+ !Wnd ||
+ UserGetAncestor(ThreadQueue->spwndFocus, GA_ROOT) != Wnd)
+ {
+ co_UserSetFocus(Wnd);
+ }
}
}