mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 17:02:13 +00:00
Initialize WIN_CritSection earlier.
This commit is contained in:
parent
3d35e9894c
commit
ef61c0b632
|
@ -158,6 +158,7 @@ typedef struct
|
|||
#define BWA_SKIPICONIC 0x0008
|
||||
|
||||
/* Window functions */
|
||||
extern void WIN_Init( void );
|
||||
extern void WIN_LockWnds();
|
||||
extern void WIN_UnlockWnds();
|
||||
extern int WIN_SuspendWndsLock();
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "global.h"
|
||||
#include "dce.h"
|
||||
#include "shell.h"
|
||||
#include "win.h"
|
||||
#include "winproc.h"
|
||||
#include "syslevel.h"
|
||||
#include "services.h"
|
||||
|
@ -213,6 +214,9 @@ BOOL WINAPI MAIN_UserInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserve
|
|||
/* Global atom table initialisation */
|
||||
if (!ATOM_Init( USER_HeapSel )) return FALSE;
|
||||
|
||||
/* Initialize window handling (critical section) */
|
||||
WIN_Init();
|
||||
|
||||
/* Initialize system colors and metrics*/
|
||||
SYSMETRICS_Init();
|
||||
SYSCOLOR_Init();
|
||||
|
|
|
@ -52,6 +52,16 @@ static WORD wDragHeight= 3;
|
|||
/* thread safeness */
|
||||
static CRITICAL_SECTION WIN_CritSection;
|
||||
|
||||
/***********************************************************************
|
||||
* WIN_Init
|
||||
*/
|
||||
void WIN_Init( void )
|
||||
{
|
||||
/* Initialisation of the critical section for thread safeness */
|
||||
InitializeCriticalSection(&WIN_CritSection);
|
||||
MakeCriticalSectionGlobal(&WIN_CritSection);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* WIN_LockWnds
|
||||
*
|
||||
|
@ -604,10 +614,6 @@ BOOL WIN_CreateDesktopWindow(void)
|
|||
|
||||
TRACE_(win)("Creating desktop window\n");
|
||||
|
||||
|
||||
/* Initialisation of the critical section for thread safeness */
|
||||
InitializeCriticalSection(&WIN_CritSection);
|
||||
MakeCriticalSectionGlobal(&WIN_CritSection);
|
||||
|
||||
if (!ICONTITLE_Init() ||
|
||||
!WINPOS_CreateInternalPosAtom() ||
|
||||
|
|
Loading…
Reference in a new issue