Attempt to fix WinPosActivateOtherWindow problem reported by GvG.

svn path=/trunk/; revision=6837
This commit is contained in:
Filip Navara 2003-11-30 22:48:11 +00:00
parent 1c863eef7a
commit ef4ad83edf
3 changed files with 9 additions and 14 deletions

View file

@ -17,5 +17,7 @@ IntGetThreadFocusWindow();
BOOL FASTCALL BOOL FASTCALL
IntSetForegroundWindow(PWINDOW_OBJECT Window); IntSetForegroundWindow(PWINDOW_OBJECT Window);
HWND FASTCALL
IntSetActiveWindow(PWINDOW_OBJECT Window);
#endif /* _WIN32K_FOCUS_H */ #endif /* _WIN32K_FOCUS_H */

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* $Id: focus.c,v 1.1 2003/11/30 20:29:09 navaraf Exp $ * $Id: focus.c,v 1.2 2003/11/30 22:48:11 navaraf Exp $
*/ */
#include <win32k/win32k.h> #include <win32k/win32k.h>
@ -171,10 +171,10 @@ IntSetActiveWindow(PWINDOW_OBJECT Window)
if (Window != 0) if (Window != 0)
{ {
if (Window->MessageQueue != ThreadQueue) if (!(Window->Style & WS_VISIBLE) ||
(Window->Style & (WS_POPUP | WS_CHILD)) == WS_CHILD)
{ {
IntReleaseWindowObject(Window); return ThreadQueue ? 0 : ThreadQueue->ActiveWindow;
return 0;
} }
hWnd = Window->Self; hWnd = Window->Self;
} }
@ -264,13 +264,6 @@ NtUserSetActiveWindow(HWND hWnd)
ThreadQueue = (PUSER_MESSAGE_QUEUE)PsGetWin32Thread()->MessageQueue; ThreadQueue = (PUSER_MESSAGE_QUEUE)PsGetWin32Thread()->MessageQueue;
if (!(Window->Style & WS_VISIBLE) ||
(Window->Style & (WS_POPUP | WS_CHILD)) == WS_CHILD)
{
IntReleaseWindowObject(Window);
return ThreadQueue ? 0 : ThreadQueue->ActiveWindow;
}
if (Window->MessageQueue != ThreadQueue) if (Window->MessageQueue != ThreadQueue)
{ {
IntReleaseWindowObject(Window); IntReleaseWindowObject(Window);

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: winpos.c,v 1.48 2003/11/30 20:03:47 navaraf Exp $ /* $Id: winpos.c,v 1.49 2003/11/30 22:48:11 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -166,9 +166,9 @@ done:
IntReleaseWindowObject(Window); IntReleaseWindowObject(Window);
} }
if (! NtUserSetActiveWindow(hwndTo)) if (!IntSetActiveWindow(hwndTo))
{ {
NtUserSetActiveWindow(NULL); IntSetActiveWindow(NULL);
} }
} }