mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 11:32:56 +00:00
[Win32k]
- Troubleshooting bug 5630, moved DestroyProcessClasses from process to thread since process is called first. This way, it is assured the class destruction is on queue, but not before thread death. - Added a global pointer to be used in a later commit. - Warning: this does not fix bug 5630. svn path=/trunk/; revision=56386
This commit is contained in:
parent
68ce44de26
commit
814e1a9ae5
4 changed files with 23 additions and 4 deletions
|
@ -128,6 +128,7 @@ static VOID
|
||||||
IntDestroyClass(IN OUT PCLS Class)
|
IntDestroyClass(IN OUT PCLS Class)
|
||||||
{
|
{
|
||||||
PDESKTOP pDesk;
|
PDESKTOP pDesk;
|
||||||
|
|
||||||
/* There shouldn't be any clones anymore */
|
/* There shouldn't be any clones anymore */
|
||||||
ASSERT(Class->cWndReferenceCount == 0);
|
ASSERT(Class->cWndReferenceCount == 0);
|
||||||
ASSERT(Class->pclsClone == NULL);
|
ASSERT(Class->pclsClone == NULL);
|
||||||
|
@ -620,9 +621,11 @@ IntDereferenceClass(IN OUT PCLS Class,
|
||||||
{
|
{
|
||||||
PCLS *PrevLink, BaseClass, CurrentClass;
|
PCLS *PrevLink, BaseClass, CurrentClass;
|
||||||
|
|
||||||
|
ASSERT(Class->cWndReferenceCount >= 1);
|
||||||
|
|
||||||
BaseClass = Class->pclsBase;
|
BaseClass = Class->pclsBase;
|
||||||
|
|
||||||
if (--Class->cWndReferenceCount <= 0)
|
if (--Class->cWndReferenceCount == 0)
|
||||||
{
|
{
|
||||||
if (BaseClass == Class)
|
if (BaseClass == Class)
|
||||||
{
|
{
|
||||||
|
|
|
@ -175,9 +175,6 @@ Win32kProcessCallback(struct _EPROCESS *Process,
|
||||||
IntCleanupMenus(Process, ppiCurrent);
|
IntCleanupMenus(Process, ppiCurrent);
|
||||||
IntCleanupCurIcons(Process, ppiCurrent);
|
IntCleanupCurIcons(Process, ppiCurrent);
|
||||||
|
|
||||||
/* no process windows should exist at this point, or the function will assert! */
|
|
||||||
DestroyProcessClasses(ppiCurrent);
|
|
||||||
ppiCurrent->W32PF_flags &= ~W32PF_CLASSESREGISTERED;
|
|
||||||
|
|
||||||
GDI_CleanupForProcess(Process);
|
GDI_CleanupForProcess(Process);
|
||||||
|
|
||||||
|
@ -205,6 +202,8 @@ Win32kProcessCallback(struct _EPROCESS *Process,
|
||||||
GdiPoolDestroy(ppiCurrent->pPoolBrushAttr);
|
GdiPoolDestroy(ppiCurrent->pPoolBrushAttr);
|
||||||
GdiPoolDestroy(ppiCurrent->pPoolRgnAttr);
|
GdiPoolDestroy(ppiCurrent->pPoolRgnAttr);
|
||||||
|
|
||||||
|
if (gppiInputProvider == ppiCurrent) gppiInputProvider = NULL;
|
||||||
|
|
||||||
TRACE_CH(UserProcess,"Freeing ppi 0x%x\n", ppiCurrent);
|
TRACE_CH(UserProcess,"Freeing ppi 0x%x\n", ppiCurrent);
|
||||||
|
|
||||||
/* Ftee the PROCESSINFO */
|
/* Ftee the PROCESSINFO */
|
||||||
|
@ -432,7 +431,22 @@ UserDestroyThreadInfo(struct _ETHREAD *Thread)
|
||||||
DestroyTimersForThread(ptiCurrent);
|
DestroyTimersForThread(ptiCurrent);
|
||||||
KeSetEvent(ptiCurrent->MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE);
|
KeSetEvent(ptiCurrent->MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE);
|
||||||
UnregisterThreadHotKeys(Thread);
|
UnregisterThreadHotKeys(Thread);
|
||||||
|
/*
|
||||||
|
if (IsListEmpty(&ptiCurrent->WindowListHead))
|
||||||
|
{
|
||||||
|
ERR_CH(UserThread,"Thread Window List is Empty!\n");
|
||||||
|
}
|
||||||
|
*/
|
||||||
co_DestroyThreadWindows(Thread);
|
co_DestroyThreadWindows(Thread);
|
||||||
|
|
||||||
|
if (ppiCurrent && ppiCurrent->ptiList == ptiCurrent && !ptiCurrent->ptiSibling)
|
||||||
|
{
|
||||||
|
//ERR_CH(UserThread,"DestroyProcessClasses\n");
|
||||||
|
/* no process windows should exist at this point, or the function will assert! */
|
||||||
|
DestroyProcessClasses(ppiCurrent);
|
||||||
|
ppiCurrent->W32PF_flags &= ~W32PF_CLASSESREGISTERED;
|
||||||
|
}
|
||||||
|
|
||||||
IntBlockInput(ptiCurrent, FALSE);
|
IntBlockInput(ptiCurrent, FALSE);
|
||||||
IntCleanupThreadCallbacks(ptiCurrent);
|
IntCleanupThreadCallbacks(ptiCurrent);
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ DBG_DEFAULT_CHANNEL(UserMisc);
|
||||||
/* GLOBALS *******************************************************************/
|
/* GLOBALS *******************************************************************/
|
||||||
|
|
||||||
PTHREADINFO gptiCurrent = NULL;
|
PTHREADINFO gptiCurrent = NULL;
|
||||||
|
PPROCESSINFO gppiInputProvider = NULL;
|
||||||
ERESOURCE UserLock;
|
ERESOURCE UserLock;
|
||||||
ATOM AtomMessage; // Window Message atom.
|
ATOM AtomMessage; // Window Message atom.
|
||||||
ATOM AtomWndObj; // Window Object atom.
|
ATOM AtomWndObj; // Window Object atom.
|
||||||
|
|
|
@ -13,6 +13,7 @@ extern BOOL gbInitialized;
|
||||||
extern PSERVERINFO gpsi;
|
extern PSERVERINFO gpsi;
|
||||||
extern PTHREADINFO gptiCurrent;
|
extern PTHREADINFO gptiCurrent;
|
||||||
extern PPROCESSINFO ppiScrnSaver;
|
extern PPROCESSINFO ppiScrnSaver;
|
||||||
|
extern PPROCESSINFO gppiInputProvider;
|
||||||
|
|
||||||
INIT_FUNCTION NTSTATUS NTAPI InitUserImpl(VOID);
|
INIT_FUNCTION NTSTATUS NTAPI InitUserImpl(VOID);
|
||||||
VOID FASTCALL CleanupUserImpl(VOID);
|
VOID FASTCALL CleanupUserImpl(VOID);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue