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:
parent
07b9f3f609
commit
60f6a37f95
|
@ -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 )
|
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 )
|
static LRESULT CDECL nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
|
||||||
|
|
|
@ -1118,7 +1118,16 @@ static BOOL show_window( HWND hwnd, INT cmd )
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsRectEmpty( &newPos )) new_swp = swp;
|
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;
|
swp = new_swp;
|
||||||
|
|
||||||
parent = GetAncestor( hwnd, GA_PARENT );
|
parent = GetAncestor( hwnd, GA_PARENT );
|
||||||
|
|
Loading…
Reference in New Issue