FindWindow() should search the threads desktop, not the active one.

svn path=/trunk/; revision=10059
This commit is contained in:
Gé van Geldorp 2004-07-09 20:57:38 +00:00
parent fe2b1d6967
commit 4f24993634
3 changed files with 17 additions and 3 deletions

View file

@ -31,6 +31,9 @@ IntGetScreenDC(VOID);
HWND FASTCALL HWND FASTCALL
IntGetDesktopWindow (VOID); IntGetDesktopWindow (VOID);
HWND FASTCALL
IntGetCurrentThreadDesktopWindow(VOID);
PUSER_MESSAGE_QUEUE FASTCALL PUSER_MESSAGE_QUEUE FASTCALL
IntGetFocusMessageQueue(VOID); IntGetFocusMessageQueue(VOID);

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: desktop.c,v 1.16 2004/07/03 13:55:36 navaraf Exp $ * $Id: desktop.c,v 1.17 2004/07/09 20:57:38 gvg Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -206,6 +206,17 @@ HWND FASTCALL IntGetDesktopWindow(VOID)
return pdo->DesktopWindow; return pdo->DesktopWindow;
} }
HWND FASTCALL IntGetCurrentThreadDesktopWindow(VOID)
{
PDESKTOP_OBJECT pdo = PsGetWin32Thread()->Desktop;
if (NULL == pdo)
{
DPRINT1("Thread doesn't have a desktop\n");
return NULL;
}
return pdo->DesktopWindow;
}
/* PUBLIC FUNCTIONS ***********************************************************/ /* PUBLIC FUNCTIONS ***********************************************************/
NTSTATUS FASTCALL NTSTATUS FASTCALL

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: window.c,v 1.242 2004/07/03 17:40:25 navaraf Exp $ /* $Id: window.c,v 1.243 2004/07/09 20:57:38 gvg Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -2381,7 +2381,7 @@ NtUserFindWindowEx(HWND hwndParent,
PWNDCLASS_OBJECT ClassObject = NULL; PWNDCLASS_OBJECT ClassObject = NULL;
BOOL ClassFound; BOOL ClassFound;
Desktop = IntGetDesktopWindow(); Desktop = IntGetCurrentThreadDesktopWindow();
if(hwndParent == NULL) if(hwndParent == NULL)
hwndParent = Desktop; hwndParent = Desktop;