- Remove old pump hook and use new client thread information. Tested with Qemu and installed and run more than twice FF 1.5.03.

svn path=/trunk/; revision=32890
This commit is contained in:
James Tabor 2008-04-07 19:02:21 +00:00
parent fab0ebbcca
commit b242c12bdc
3 changed files with 18 additions and 8 deletions

View file

@ -11,7 +11,8 @@ typedef struct _W32THREAD
struct _KBL* KeyboardLayout;
struct _DESKTOP_OBJECT* Desktop;
HANDLE hDesktop;
DWORD MessagePumpHookValue;
PVOID pgdiDcattr;
PVOID pgdiBrushAttr;
BOOLEAN IsExiting;
SINGLE_LIST_ENTRY ReferencesList;
ULONG Hooks;

View file

@ -266,7 +266,8 @@ Win32kThreadCallback(struct _ETHREAD *Thread,
co_IntDestroyCaret(Win32Thread);
Win32Thread->MessageQueue = MsqCreateMessageQueue(Thread);
Win32Thread->KeyboardLayout = W32kGetDefaultKeyLayout();
Win32Thread->MessagePumpHookValue = 0;
if (Win32Thread->ThreadInfo)
Win32Thread->ThreadInfo->ClientThreadInfo.dwcPumpHook = 0;
}
else
{

View file

@ -1822,19 +1822,27 @@ CLEANUP:
BOOL STDCALL
IntInitMessagePumpHook()
{
((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->MessagePumpHookValue++;
return TRUE;
if (((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->ThreadInfo)
{
((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->ThreadInfo->ClientThreadInfo.dwcPumpHook++;
return TRUE;
}
return FALSE;
}
BOOL STDCALL
IntUninitMessagePumpHook()
{
if (((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->MessagePumpHookValue <= 0)
if (((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->ThreadInfo)
{
return FALSE;
if (((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->ThreadInfo->ClientThreadInfo.dwcPumpHook <= 0)
{
return FALSE;
}
((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->ThreadInfo->ClientThreadInfo.dwcPumpHook--;
return TRUE;
}
((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->MessagePumpHookValue--;
return TRUE;
return FALSE;
}
/* EOF */