Commit 15dfe2ed authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

win32u: Rename user driver CreateDesktopWindow entry to SetDesktopWindow.

This doesn't create anything, but instead notifies the user driver of the current desktop window, either when it is created, or when a thread calling NtUserGetDesktopWindow receives the current desktop window.
parent 8190aa25
......@@ -783,11 +783,6 @@ static BOOL nulldrv_UpdateDisplayDevices( const struct gdi_device_manager *manag
return FALSE;
}
static BOOL nulldrv_CreateDesktopWindow( HWND hwnd )
{
return TRUE;
}
static BOOL nodrv_CreateWindow( HWND hwnd )
{
static int warned;
......@@ -842,6 +837,10 @@ static void nulldrv_SetCapture( HWND hwnd, UINT flags )
{
}
static void nulldrv_SetDesktopWindow( HWND hwnd )
{
}
static void nulldrv_SetFocus( HWND hwnd )
{
}
......@@ -1150,11 +1149,6 @@ static BOOL loaderdrv_UpdateDisplayDevices( const struct gdi_device_manager *man
return load_driver()->pUpdateDisplayDevices( manager, force, param );
}
static BOOL loaderdrv_CreateDesktopWindow( HWND hwnd )
{
return load_driver()->pCreateDesktopWindow( hwnd );
}
static BOOL loaderdrv_CreateWindow( HWND hwnd )
{
return load_driver()->pCreateWindow( hwnd );
......@@ -1171,6 +1165,11 @@ static void loaderdrv_FlashWindowEx( FLASHWINFO *info )
load_driver()->pFlashWindowEx( info );
}
static void loaderdrv_SetDesktopWindow( HWND hwnd )
{
load_driver()->pSetDesktopWindow( hwnd );
}
static void loaderdrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
{
load_driver()->pSetLayeredWindowAttributes( hwnd, key, alpha, flags );
......@@ -1223,7 +1222,6 @@ static const struct user_driver_funcs lazy_load_driver =
loaderdrv_GetDisplayDepth,
loaderdrv_UpdateDisplayDevices,
/* windowing functions */
loaderdrv_CreateDesktopWindow,
loaderdrv_CreateWindow,
nulldrv_DesktopWindowProc,
nulldrv_DestroyWindow,
......@@ -1233,6 +1231,7 @@ static const struct user_driver_funcs lazy_load_driver =
nulldrv_ReleaseDC,
nulldrv_ScrollDC,
nulldrv_SetCapture,
loaderdrv_SetDesktopWindow,
nulldrv_SetFocus,
loaderdrv_SetLayeredWindowAttributes,
nulldrv_SetParent,
......@@ -1301,7 +1300,6 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version
SET_USER_FUNC(GetCurrentDisplaySettings);
SET_USER_FUNC(GetDisplayDepth);
SET_USER_FUNC(UpdateDisplayDevices);
SET_USER_FUNC(CreateDesktopWindow);
SET_USER_FUNC(CreateWindow);
SET_USER_FUNC(DesktopWindowProc);
SET_USER_FUNC(DestroyWindow);
......@@ -1311,6 +1309,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version
SET_USER_FUNC(ReleaseDC);
SET_USER_FUNC(ScrollDC);
SET_USER_FUNC(SetCapture);
SET_USER_FUNC(SetDesktopWindow);
SET_USER_FUNC(SetFocus);
SET_USER_FUNC(SetLayeredWindowAttributes);
SET_USER_FUNC(SetParent);
......
......@@ -4953,9 +4953,7 @@ static WND *create_window_handle( HWND parent, HWND owner, UNICODE_STRING *name,
if (!thread_info->top_window)
thread_info->top_window = HandleToUlong( full_parent ? full_parent : handle );
else assert( full_parent == UlongToHandle( thread_info->top_window ));
if (full_parent &&
!user_driver->pCreateDesktopWindow( UlongToHandle( thread_info->top_window )))
ERR( "failed to create desktop window\n" );
if (full_parent) user_driver->pSetDesktopWindow( UlongToHandle( thread_info->top_window ));
register_builtin_classes();
}
else /* HWND_MESSAGE parent */
......
......@@ -496,9 +496,8 @@ HWND get_desktop_window(void)
SERVER_END_REQ;
}
if (!thread_info->top_window ||
!user_driver->pCreateDesktopWindow( UlongToHandle( thread_info->top_window )))
ERR_(win)( "failed to create desktop window\n" );
if (!thread_info->top_window) ERR_(win)( "failed to create desktop window\n" );
else user_driver->pSetDesktopWindow( UlongToHandle( thread_info->top_window ));
register_builtin_classes();
return UlongToHandle( thread_info->top_window );
......
......@@ -271,7 +271,6 @@ static const struct user_driver_funcs macdrv_funcs =
.pChangeDisplaySettings = macdrv_ChangeDisplaySettings,
.pClipCursor = macdrv_ClipCursor,
.pClipboardWindowProc = macdrv_ClipboardWindowProc,
.pCreateDesktopWindow = macdrv_CreateDesktopWindow,
.pDesktopWindowProc = macdrv_DesktopWindowProc,
.pDestroyCursorIcon = macdrv_DestroyCursorIcon,
.pDestroyWindow = macdrv_DestroyWindow,
......@@ -287,6 +286,7 @@ static const struct user_driver_funcs macdrv_funcs =
.pSetCapture = macdrv_SetCapture,
.pSetCursor = macdrv_SetCursor,
.pSetCursorPos = macdrv_SetCursorPos,
.pSetDesktopWindow = macdrv_SetDesktopWindow,
.pSetFocus = macdrv_SetFocus,
.pSetLayeredWindowAttributes = macdrv_SetLayeredWindowAttributes,
.pSetParent = macdrv_SetParent,
......
......@@ -134,9 +134,9 @@ extern BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device
extern BOOL macdrv_GetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp) DECLSPEC_HIDDEN;
extern BOOL macdrv_SetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp) DECLSPEC_HIDDEN;
extern BOOL macdrv_ClipCursor(LPCRECT clip) DECLSPEC_HIDDEN;
extern BOOL macdrv_CreateDesktopWindow(HWND hwnd) DECLSPEC_HIDDEN;
extern LRESULT macdrv_DesktopWindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) DECLSPEC_HIDDEN;
extern void macdrv_DestroyWindow(HWND hwnd) DECLSPEC_HIDDEN;
extern void macdrv_SetDesktopWindow(HWND hwnd) DECLSPEC_HIDDEN;
extern void macdrv_SetFocus(HWND hwnd) DECLSPEC_HIDDEN;
extern void macdrv_SetLayeredWindowAttributes(HWND hwnd, COLORREF key, BYTE alpha,
DWORD flags) DECLSPEC_HIDDEN;
......
......@@ -1536,9 +1536,9 @@ static void perform_window_command(HWND hwnd, unsigned int style_any, unsigned i
/**********************************************************************
* CreateDesktopWindow (MACDRV.@)
* SetDesktopWindow (MACDRV.@)
*/
BOOL macdrv_CreateDesktopWindow(HWND hwnd)
void macdrv_SetDesktopWindow(HWND hwnd)
{
unsigned int width, height;
......@@ -1575,7 +1575,6 @@ BOOL macdrv_CreateDesktopWindow(HWND hwnd)
}
set_app_icon();
return TRUE;
}
void macdrv_resize_desktop(void)
......
......@@ -409,7 +409,6 @@ static const struct user_driver_funcs x11drv_funcs =
.pGetCurrentDisplaySettings = X11DRV_GetCurrentDisplaySettings,
.pGetDisplayDepth = X11DRV_GetDisplayDepth,
.pUpdateDisplayDevices = X11DRV_UpdateDisplayDevices,
.pCreateDesktopWindow = X11DRV_CreateDesktopWindow,
.pCreateWindow = X11DRV_CreateWindow,
.pDesktopWindowProc = X11DRV_DesktopWindowProc,
.pDestroyWindow = X11DRV_DestroyWindow,
......@@ -419,6 +418,7 @@ static const struct user_driver_funcs x11drv_funcs =
.pReleaseDC = X11DRV_ReleaseDC,
.pScrollDC = X11DRV_ScrollDC,
.pSetCapture = X11DRV_SetCapture,
.pSetDesktopWindow = X11DRV_SetDesktopWindow,
.pSetFocus = X11DRV_SetFocus,
.pSetLayeredWindowAttributes = X11DRV_SetLayeredWindowAttributes,
.pSetParent = X11DRV_SetParent,
......
......@@ -1864,9 +1864,9 @@ BOOL create_desktop_win_data( Window win )
}
/**********************************************************************
* CreateDesktopWindow (X11DRV.@)
* SetDesktopWindow (X11DRV.@)
*/
BOOL X11DRV_CreateDesktopWindow( HWND hwnd )
void X11DRV_SetDesktopWindow( HWND hwnd )
{
unsigned int width, height;
......@@ -1904,7 +1904,6 @@ BOOL X11DRV_CreateDesktopWindow( HWND hwnd )
Window win = (Window)NtUserGetProp( hwnd, whole_window_prop );
if (win && win != root_window) X11DRV_init_desktop( win, width, height );
}
return TRUE;
}
......
......@@ -222,7 +222,6 @@ extern BOOL X11DRV_GetCurrentDisplaySettings( LPCWSTR name, BOOL is_primary, LPD
extern INT X11DRV_GetDisplayDepth( LPCWSTR name, BOOL is_primary ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manager,
BOOL force, void *param ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_CreateDesktopWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_CreateWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern LRESULT X11DRV_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) DECLSPEC_HIDDEN;
extern void X11DRV_DestroyWindow( HWND hwnd ) DECLSPEC_HIDDEN;
......@@ -232,6 +231,7 @@ extern void X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect,
extern void X11DRV_ReleaseDC( HWND hwnd, HDC hdc ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ) DECLSPEC_HIDDEN;
extern void X11DRV_SetCapture( HWND hwnd, UINT flags ) DECLSPEC_HIDDEN;
extern void X11DRV_SetDesktopWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern void X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha,
DWORD flags ) DECLSPEC_HIDDEN;
extern void X11DRV_SetParent( HWND hwnd, HWND parent, HWND old_parent ) DECLSPEC_HIDDEN;
......
......@@ -307,7 +307,6 @@ struct user_driver_funcs
INT (*pGetDisplayDepth)(LPCWSTR,BOOL);
BOOL (*pUpdateDisplayDevices)(const struct gdi_device_manager *,BOOL,void*);
/* windowing functions */
BOOL (*pCreateDesktopWindow)(HWND);
BOOL (*pCreateWindow)(HWND);
LRESULT (*pDesktopWindowProc)(HWND,UINT,WPARAM,LPARAM);
void (*pDestroyWindow)(HWND);
......@@ -317,6 +316,7 @@ struct user_driver_funcs
void (*pReleaseDC)(HWND,HDC);
BOOL (*pScrollDC)(HDC,INT,INT,HRGN);
void (*pSetCapture)(HWND,UINT);
void (*pSetDesktopWindow)(HWND);
void (*pSetFocus)(HWND);
void (*pSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD);
void (*pSetParent)(HWND,HWND,HWND);
......
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