diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c index 201988c3ac9..32acf28ba48 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c @@ -155,6 +155,7 @@ static const USER_DRIVER *load_driver(void) GET_USER_FUNC(WindowPosChanging); GET_USER_FUNC(WindowPosChanged); GET_USER_FUNC(SystemParametersInfo); + GET_USER_FUNC(ThreadDetach); #undef GET_USER_FUNC } @@ -512,6 +513,10 @@ static BOOL CDECL nulldrv_SystemParametersInfo( UINT action, UINT int_param, voi return FALSE; } +static void CDECL nulldrv_ThreadDetach( void ) +{ +} + static USER_DRIVER null_driver = { /* keyboard functions */ @@ -572,7 +577,9 @@ static USER_DRIVER null_driver = nulldrv_WindowPosChanging, nulldrv_WindowPosChanged, /* system parameters */ - nulldrv_SystemParametersInfo + nulldrv_SystemParametersInfo, + /* thread management */ + nulldrv_ThreadDetach }; @@ -827,5 +834,7 @@ static USER_DRIVER lazy_load_driver = nulldrv_WindowPosChanging, nulldrv_WindowPosChanged, /* system parameters */ - nulldrv_SystemParametersInfo + nulldrv_SystemParametersInfo, + /* thread management */ + nulldrv_ThreadDetach }; diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index 45aea81ec19..74a76172c02 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -303,6 +303,7 @@ static void thread_detach(void) exiting_thread_id = GetCurrentThreadId(); WDML_NotifyThreadDetach(); + USER_Driver->pThreadDetach(); if (thread_info->top_window) WIN_DestroyThreadWindows( thread_info->top_window ); if (thread_info->msg_window) WIN_DestroyThreadWindows( thread_info->msg_window ); diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index e4a2ed135e4..efad5196703 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -117,6 +117,8 @@ typedef struct tagUSER_DRIVER { void (CDECL *pWindowPosChanged)(HWND,HWND,UINT,const RECT *,const RECT *,const RECT *,const RECT *,struct window_surface*); /* system parameters */ BOOL (CDECL *pSystemParametersInfo)(UINT,UINT,void*,UINT); + /* thread management */ + void (CDECL *pThreadDetach)(void); } USER_DRIVER; extern const USER_DRIVER *USER_Driver DECLSPEC_HIDDEN;