Fixed reparenting to desktop (found by Gerard Patel).

This commit is contained in:
Alexandre Julliard 2001-05-10 21:06:56 +00:00
parent 2418edb101
commit b19c57ca71
2 changed files with 6 additions and 4 deletions

View File

@ -398,8 +398,9 @@ HWND X11DRV_SetParent( HWND hwnd, HWND parent )
dwStyle = wndPtr->dwStyle;
pWndParent = parent ? WIN_FindWndPtr(parent) : WIN_GetDesktop();
if (!pWndParent)
if (!parent) parent = GetDesktopWindow();
if (!(pWndParent = WIN_FindWndPtr(parent)))
{
WIN_ReleaseWndPtr( wndPtr );
return 0;

View File

@ -2391,8 +2391,9 @@ HWND WINAPI SetParent( HWND hwnd, HWND parent )
dwStyle = wndPtr->dwStyle;
pWndParent = parent ? WIN_FindWndPtr(parent) : WIN_GetDesktop();
if (!pWndParent)
if (!parent) parent = GetDesktopWindow();
if (!(pWndParent = WIN_FindWndPtr(parent)))
{
WIN_ReleaseWndPtr( wndPtr );
return 0;