Commit 4f15239c authored by Alexandre Julliard's avatar Alexandre Julliard Committed by Alexandre Julliard

ATOMs are considered unique, so we don't need to check class

pointers in FindWindow.
parent ed5ac5f6
......@@ -1494,7 +1494,6 @@ static HWND WIN_FindWindow( HWND parent, HWND child, ATOM className,
{
WND *pWnd;
HWND retvalue;
CLASS *pClass = NULL;
if (child)
{
......@@ -1529,30 +1528,9 @@ static HWND WIN_FindWindow( HWND parent, HWND child, ATOM className,
goto end;
}
/* For a child window, all siblings will have the same hInstance, */
/* so we can look for the class once and for all. */
if (className && (pWnd->dwStyle & WS_CHILD))
{
if (!(pClass = CLASS_FindClassByAtom( className, pWnd->hInstance )))
{
retvalue = 0;
goto end;
}
}
for ( ; pWnd ; WIN_UpdateWndPtr(&pWnd,pWnd->next))
{
if (className && !(pWnd->dwStyle & WS_CHILD))
{
if (!((pClass = CLASS_FindClassByAtom( className, pWnd->hInstance))
||(pClass = CLASS_FindClassByAtom( className, GetExePtr(pWnd->hInstance))))
)
continue; /* Skip this window */
}
if (pClass && (pWnd->class != pClass))
if (className && (pWnd->class->atomName != className))
continue; /* Not the right class */
/* Now check the title */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment