Commit 4c431197 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent cd337174
...@@ -119,6 +119,7 @@ static const USER_DRIVER *load_driver(void) ...@@ -119,6 +119,7 @@ static const USER_DRIVER *load_driver(void)
GET_USER_FUNC(SetWindowIcon); GET_USER_FUNC(SetWindowIcon);
GET_USER_FUNC(SetWindowStyle); GET_USER_FUNC(SetWindowStyle);
GET_USER_FUNC(SetWindowText); GET_USER_FUNC(SetWindowText);
GET_USER_FUNC(ShowWindow);
GET_USER_FUNC(SysCommand); GET_USER_FUNC(SysCommand);
GET_USER_FUNC(WindowMessage); GET_USER_FUNC(WindowMessage);
GET_USER_FUNC(WindowPosChanging); GET_USER_FUNC(WindowPosChanging);
...@@ -395,6 +396,11 @@ static void nulldrv_SetWindowText( HWND hwnd, LPCWSTR text ) ...@@ -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 ) static LRESULT nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
{ {
return -1; return -1;
...@@ -472,6 +478,7 @@ static USER_DRIVER null_driver = ...@@ -472,6 +478,7 @@ static USER_DRIVER null_driver =
nulldrv_SetWindowIcon, nulldrv_SetWindowIcon,
nulldrv_SetWindowStyle, nulldrv_SetWindowStyle,
nulldrv_SetWindowText, nulldrv_SetWindowText,
nulldrv_ShowWindow,
nulldrv_SysCommand, nulldrv_SysCommand,
nulldrv_WindowMessage, nulldrv_WindowMessage,
nulldrv_WindowPosChanging, nulldrv_WindowPosChanging,
...@@ -726,6 +733,11 @@ static void loaderdrv_SetWindowText( HWND hwnd, LPCWSTR text ) ...@@ -726,6 +733,11 @@ static void loaderdrv_SetWindowText( HWND hwnd, LPCWSTR text )
load_driver()->pSetWindowText( hwnd, 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 ) static LRESULT loaderdrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
{ {
return load_driver()->pSysCommand( hwnd, wparam, lparam ); return load_driver()->pSysCommand( hwnd, wparam, lparam );
...@@ -807,6 +819,7 @@ static USER_DRIVER lazy_load_driver = ...@@ -807,6 +819,7 @@ static USER_DRIVER lazy_load_driver =
loaderdrv_SetWindowIcon, loaderdrv_SetWindowIcon,
loaderdrv_SetWindowStyle, loaderdrv_SetWindowStyle,
loaderdrv_SetWindowText, loaderdrv_SetWindowText,
loaderdrv_ShowWindow,
loaderdrv_SysCommand, loaderdrv_SysCommand,
loaderdrv_WindowMessage, loaderdrv_WindowMessage,
loaderdrv_WindowPosChanging, loaderdrv_WindowPosChanging,
......
...@@ -155,6 +155,7 @@ typedef struct tagUSER_DRIVER { ...@@ -155,6 +155,7 @@ typedef struct tagUSER_DRIVER {
void (*pSetWindowIcon)(HWND,UINT,HICON); void (*pSetWindowIcon)(HWND,UINT,HICON);
void (*pSetWindowStyle)(HWND,DWORD); void (*pSetWindowStyle)(HWND,DWORD);
void (*pSetWindowText)(HWND,LPCWSTR); void (*pSetWindowText)(HWND,LPCWSTR);
UINT (*pShowWindow)(HWND,INT,RECT*,UINT);
LRESULT (*pSysCommand)(HWND,WPARAM,LPARAM); LRESULT (*pSysCommand)(HWND,WPARAM,LPARAM);
LRESULT (*pWindowMessage)(HWND,UINT,WPARAM,LPARAM); LRESULT (*pWindowMessage)(HWND,UINT,WPARAM,LPARAM);
void (*pWindowPosChanging)(HWND,HWND,UINT,const RECT *,const RECT *,RECT *); void (*pWindowPosChanging)(HWND,HWND,UINT,const RECT *,const RECT *,RECT *);
......
...@@ -1046,6 +1046,8 @@ static BOOL show_window( HWND hwnd, INT cmd ) ...@@ -1046,6 +1046,8 @@ static BOOL show_window( HWND hwnd, INT cmd )
if (!IsWindow( hwnd )) return wasVisible; if (!IsWindow( hwnd )) return wasVisible;
} }
swp = USER_Driver->pShowWindow( hwnd, cmd, &newPos, swp );
parent = GetAncestor( hwnd, GA_PARENT ); parent = GetAncestor( hwnd, GA_PARENT );
if (parent && !IsWindowVisible( parent ) && !(swp & SWP_STATECHANGED)) if (parent && !IsWindowVisible( parent ) && !(swp & SWP_STATECHANGED))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment