user32: Return reasonable values in GetWindowPlacement for the desktop window.

This commit is contained in:
Alexandre Julliard 2008-05-22 17:04:22 +02:00
parent 03a7ddb73c
commit 688febb8ce
1 changed files with 14 additions and 1 deletions

View File

@ -1172,7 +1172,20 @@ BOOL WINAPI GetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *wndpl )
{
WND *pWnd = WIN_GetPtr( hwnd );
if (!pWnd || pWnd == WND_DESKTOP) return FALSE;
if (!pWnd) return FALSE;
if (pWnd == WND_DESKTOP)
{
wndpl->length = sizeof(*wndpl);
wndpl->showCmd = SW_SHOWNORMAL;
wndpl->flags = 0;
wndpl->ptMinPosition.x = -1;
wndpl->ptMinPosition.y = -1;
wndpl->ptMaxPosition.x = -1;
wndpl->ptMaxPosition.y = -1;
GetWindowRect( hwnd, &wndpl->rcNormalPosition );
return TRUE;
}
if (pWnd == WND_OTHER_PROCESS)
{
if (IsWindow( hwnd )) FIXME( "not supported on other process window %p\n", hwnd );