Aric Stewart aric@codeweavers.com writes:
@@ -1512,11 +1589,15 @@ BOOL WINAPI ImmGetConversionStatus( */ HWND WINAPI ImmGetDefaultIMEWnd(HWND hWnd) {
- if (IMM_GetThreadData()->hwndDefault == NULL)
IMM_GetThreadData()->hwndDefault = CreateWindowExW( WS_EX_TOOLWINDOW,
- HWND ret;
- IMMThreadData* thread_data = IMM_GetThreadData(0);
- if (thread_data->hwndDefault == NULL)
thread_data->hwndDefault = CreateWindowExW( WS_EX_TOOLWINDOW, szwIME, NULL, WS_POPUP, 0, 0, 1, 1, 0, 0, 0, 0);
- TRACE("Default is %p\n",IMM_GetThreadData()->hwndDefault);
- return IMM_GetThreadData()->hwndDefault;
- ret = thread_data->hwndDefault;
- LeaveCriticalSection(&threaddata_cs);
- TRACE("Default is %p\n",ret);
- return ret;
You can't create a window while holding the critical section, this will cause deadlocks.