user32: Add a default ShowWindow implementation.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-05-14 13:40:05 +02:00 committed by Alexandre Julliard
parent 07b9f3f609
commit 60f6a37f95
2 changed files with 11 additions and 2 deletions

View File

@ -356,7 +356,7 @@ static void CDECL nulldrv_SetWindowText( HWND hwnd, LPCWSTR text )
static UINT CDECL nulldrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
{
return swp;
return ~0; /* use default implementation */
}
static LRESULT CDECL nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )

View File

@ -1118,7 +1118,16 @@ static BOOL show_window( HWND hwnd, INT cmd )
}
if (IsRectEmpty( &newPos )) new_swp = swp;
else new_swp = USER_Driver->pShowWindow( hwnd, cmd, &newPos, swp );
else if ((new_swp = USER_Driver->pShowWindow( hwnd, cmd, &newPos, swp )) == ~0)
{
if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD) new_swp = swp;
else if (IsIconic( hwnd ) && (newPos.left != -32000 || newPos.top != -32000))
{
OffsetRect( &newPos, -32000 - newPos.left, -32000 - newPos.top );
new_swp = swp & ~(SWP_NOMOVE | SWP_NOCLIENTMOVE);
}
else new_swp = swp;
}
swp = new_swp;
parent = GetAncestor( hwnd, GA_PARENT );