diff --git a/reactos/subsystems/win32/win32k/main/dllmain.c b/reactos/subsystems/win32/win32k/main/dllmain.c index 84b92bf6d58..76640ba8681 100644 --- a/reactos/subsystems/win32/win32k/main/dllmain.c +++ b/reactos/subsystems/win32/win32k/main/dllmain.c @@ -264,7 +264,7 @@ Win32kThreadCallback(struct _ETHREAD *Thread, } } } - Win32Thread->IsExiting = FALSE; + Win32Thread->TIF_flags &= ~TIF_INCLEANUP; co_IntDestroyCaret(Win32Thread); Win32Thread->ppi = PsGetCurrentProcessWin32Process(); pTeb = NtCurrentTeb(); @@ -283,7 +283,6 @@ Win32kThreadCallback(struct _ETHREAD *Thread, DPRINT("Destroying W32 thread TID:%d at IRQ level: %lu\n", Thread->Cid.UniqueThread, KeGetCurrentIrql()); - Win32Thread->IsExiting = TRUE; Win32Thread->TIF_flags |= TIF_INCLEANUP; HOOK_DestroyThreadHooks(Thread); UnregisterThreadHotKeys(Thread); diff --git a/reactos/subsystems/win32/win32k/ntuser/input.c b/reactos/subsystems/win32/win32k/ntuser/input.c index c70fcb0731d..946d2940e1b 100644 --- a/reactos/subsystems/win32/win32k/ntuser/input.c +++ b/reactos/subsystems/win32/win32k/ntuser/input.c @@ -1008,7 +1008,7 @@ IntBlockInput(PTHREADINFO W32Thread, BOOL BlockIt) PTHREADINFO OldBlock; ASSERT(W32Thread); - if(!W32Thread->Desktop || (W32Thread->IsExiting && BlockIt)) + if(!W32Thread->Desktop || ((W32Thread->TIF_flags & TIF_INCLEANUP) && BlockIt)) { /* * fail blocking if exiting the thread diff --git a/reactos/subsystems/win32/win32k/ntuser/message.c b/reactos/subsystems/win32/win32k/ntuser/message.c index 580c4de4246..a2857f58899 100644 --- a/reactos/subsystems/win32/win32k/ntuser/message.c +++ b/reactos/subsystems/win32/win32k/ntuser/message.c @@ -1513,7 +1513,7 @@ co_IntSendMessageTimeoutSingle(HWND hWnd, if (NULL != Win32Thread && Window->MessageQueue == Win32Thread->MessageQueue) { - if (Win32Thread->IsExiting) + if (Win32Thread->TIF_flags & TIF_INCLEANUP) { /* Never send messages to exiting threads */ RETURN( FALSE);