user32: Add an entry point for ShowWindow to the driver interface.

This commit is contained in:
Alexandre Julliard 2008-07-30 16:13:28 +02:00
parent cd337174aa
commit 4c431197ca
3 changed files with 16 additions and 0 deletions

View File

@ -119,6 +119,7 @@ static const USER_DRIVER *load_driver(void)
GET_USER_FUNC(SetWindowIcon);
GET_USER_FUNC(SetWindowStyle);
GET_USER_FUNC(SetWindowText);
GET_USER_FUNC(ShowWindow);
GET_USER_FUNC(SysCommand);
GET_USER_FUNC(WindowMessage);
GET_USER_FUNC(WindowPosChanging);
@ -395,6 +396,11 @@ static void nulldrv_SetWindowText( HWND hwnd, LPCWSTR text )
{
}
static UINT nulldrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
{
return swp;
}
static LRESULT nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
{
return -1;
@ -472,6 +478,7 @@ static USER_DRIVER null_driver =
nulldrv_SetWindowIcon,
nulldrv_SetWindowStyle,
nulldrv_SetWindowText,
nulldrv_ShowWindow,
nulldrv_SysCommand,
nulldrv_WindowMessage,
nulldrv_WindowPosChanging,
@ -726,6 +733,11 @@ static void loaderdrv_SetWindowText( HWND hwnd, LPCWSTR text )
load_driver()->pSetWindowText( hwnd, text );
}
static UINT loaderdrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
{
return load_driver()->pShowWindow( hwnd, cmd, rect, swp );
}
static LRESULT loaderdrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
{
return load_driver()->pSysCommand( hwnd, wparam, lparam );
@ -807,6 +819,7 @@ static USER_DRIVER lazy_load_driver =
loaderdrv_SetWindowIcon,
loaderdrv_SetWindowStyle,
loaderdrv_SetWindowText,
loaderdrv_ShowWindow,
loaderdrv_SysCommand,
loaderdrv_WindowMessage,
loaderdrv_WindowPosChanging,

View File

@ -155,6 +155,7 @@ typedef struct tagUSER_DRIVER {
void (*pSetWindowIcon)(HWND,UINT,HICON);
void (*pSetWindowStyle)(HWND,DWORD);
void (*pSetWindowText)(HWND,LPCWSTR);
UINT (*pShowWindow)(HWND,INT,RECT*,UINT);
LRESULT (*pSysCommand)(HWND,WPARAM,LPARAM);
LRESULT (*pWindowMessage)(HWND,UINT,WPARAM,LPARAM);
void (*pWindowPosChanging)(HWND,HWND,UINT,const RECT *,const RECT *,RECT *);

View File

@ -1046,6 +1046,8 @@ static BOOL show_window( HWND hwnd, INT cmd )
if (!IsWindow( hwnd )) return wasVisible;
}
swp = USER_Driver->pShowWindow( hwnd, cmd, &newPos, swp );
parent = GetAncestor( hwnd, GA_PARENT );
if (parent && !IsWindowVisible( parent ) && !(swp & SWP_STATECHANGED))
{