mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[0.4.7][NTUSER] NtUserWaitForInputIdle: Fix unhandled exception BSOD 0x1E, and tweaks
Backport the following commits: 0.4.15-dev-6397-g6b7efb331c
[NTUSER] co_IntSendMessageWithCallBack: Formatting only, no functional changes 0.4.15-dev-6227-gc7e4c3a8e9
[NTUSER] NtUserWaitForInputIdle: Fix unhandled exception BSOD 0x1E CORE-18728 CORE-19014 (#5391) 0.4.15-dev-697-g9f428f5522
[NTUSER] Demote ERR to TRACE, also some minor corrections (#3132) win32k.sys master GCC8.4.0dbg RosBEWin2.2.0 3.477.504 win32k.sys 0.4.14 GCC4.7.2dbg RosBEWin2.1.6 2.904.064 -> 2.904.064 win32k.sys 0.4.13 GCC4.7.2dbg RosBEWin2.1.6 2.895.872 -> 2.895.872 win32k.sys 0.4.12 GCC4.7.2dbg RosBEWin2.1.6 2.887.680 -> 2.887.680 win32k.sys 0.4.11 GCC4.7.2dbg RosBEWin2.1.6 2.867.200 -> 2.867.200 win32k.sys 0.4.10 GCC4.7.2dbg RosBEWin2.1.6 2.863.104 -> 2.863.104 win32k.sys 0.4. 9 GCC4.7.2dbg RosBEWin2.1.6 2.834.432 -> 2.834.432 win32k.sys 0.4. 8 GCC4.7.2dbg RosBEWin2.1.6 2.830.336 -> 2.830.336 win32k.sys 0.4. 7 GCC4.7.2dbg RosBEWin2.1.6 2.830.336 -> 2.830.336
This commit is contained in:
parent
c5d1a054c2
commit
020bd0b819
1 changed files with 41 additions and 44 deletions
|
@ -2,7 +2,6 @@
|
|||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Win32k subsystem
|
||||
* PURPOSE: Messages
|
||||
* FILE: win32ss/user/ntuser/message.c
|
||||
* PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||
*/
|
||||
|
||||
|
@ -788,7 +787,7 @@ static LRESULT handle_internal_message( PWND pWnd, UINT msg, WPARAM wparam, LPAR
|
|||
}
|
||||
case WM_ASYNC_DESTROYWINDOW:
|
||||
{
|
||||
ERR("WM_ASYNC_DESTROYWINDOW\n");
|
||||
TRACE("WM_ASYNC_DESTROYWINDOW\n");
|
||||
if (pWnd->style & WS_CHILD)
|
||||
return co_UserFreeWindow(pWnd, PsGetCurrentProcessWin32Process(), PsGetCurrentThreadWin32Thread(), TRUE);
|
||||
else
|
||||
|
@ -1736,7 +1735,7 @@ co_IntSendMessageWithCallBack( HWND hWnd,
|
|||
|
||||
if (!(Window = UserGetWindowObject(hWnd)))
|
||||
{
|
||||
TRACE("SendMessageWithCallBack: Invalid handle 0x%p!\n",hWnd);
|
||||
TRACE("SendMessageWithCallBack: Invalid handle 0x%p\n",hWnd);
|
||||
RETURN(FALSE);
|
||||
}
|
||||
|
||||
|
@ -1745,17 +1744,14 @@ co_IntSendMessageWithCallBack( HWND hWnd,
|
|||
if (Window->state & WNDS_DESTROYED)
|
||||
{
|
||||
/* FIXME: last error? */
|
||||
ERR("Attempted to send message to window %p that is being destroyed!\n", hWnd);
|
||||
ERR("Attempted to send message to window %p that is being destroyed\n", hWnd);
|
||||
RETURN(FALSE);
|
||||
}
|
||||
|
||||
Win32Thread = PsGetCurrentThreadWin32Thread();
|
||||
|
||||
if (Win32Thread == NULL ||
|
||||
Win32Thread->TIF_flags & TIF_INCLEANUP)
|
||||
{
|
||||
if (Win32Thread == NULL || Win32Thread->TIF_flags & TIF_INCLEANUP)
|
||||
RETURN(FALSE);
|
||||
}
|
||||
|
||||
ptiSendTo = IntSendTo(Window, Win32Thread, Msg);
|
||||
|
||||
|
@ -1764,7 +1760,7 @@ co_IntSendMessageWithCallBack( HWND hWnd,
|
|||
{
|
||||
if (Win32Thread->TIF_flags & TIF_INCLEANUP) RETURN(FALSE);
|
||||
|
||||
TRACE("SMWCB: Internal Message!\n");
|
||||
TRACE("SMWCB: Internal Message\n");
|
||||
Result = (ULONG_PTR)handle_internal_message(Window, Msg, wParam, lParam);
|
||||
if (uResult) *uResult = Result;
|
||||
RETURN(TRUE);
|
||||
|
@ -1853,7 +1849,7 @@ co_IntSendMessageWithCallBack( HWND hWnd,
|
|||
|
||||
if(!(Message = AllocateUserMessage(FALSE)))
|
||||
{
|
||||
ERR("MsqSendMessage(): Not enough memory to allocate a message");
|
||||
ERR("Failed to allocate message\n");
|
||||
RETURN(FALSE);
|
||||
}
|
||||
|
||||
|
@ -1865,7 +1861,7 @@ co_IntSendMessageWithCallBack( HWND hWnd,
|
|||
Message->lResult = 0;
|
||||
Message->QS_Flags = 0;
|
||||
Message->ptiReceiver = ptiSendTo;
|
||||
Message->ptiSender = NULL; // mjmartin, you are right! This is null.
|
||||
Message->ptiSender = NULL;
|
||||
Message->ptiCallBackSender = Win32Thread;
|
||||
Message->CompletionCallback = CompletionCallback;
|
||||
Message->CompletionCallbackContext = CompletionCallbackContext;
|
||||
|
@ -3096,14 +3092,12 @@ NtUserWaitForInputIdle( IN HANDLE hProcess,
|
|||
Timeout.QuadPart = (LONGLONG) dwMilliseconds * (LONGLONG) -10000;
|
||||
|
||||
KeStackAttachProcess(&Process->Pcb, &ApcState);
|
||||
|
||||
W32Process->W32PF_flags |= W32PF_WAITFORINPUTIDLE;
|
||||
for (pti = W32Process->ptiList; pti; pti = pti->ptiSibling)
|
||||
{
|
||||
pti->TIF_flags |= TIF_WAITFORINPUTIDLE;
|
||||
pti->pClientInfo->dwTIFlags = pti->TIF_flags;
|
||||
}
|
||||
|
||||
KeUnstackDetachProcess(&ApcState);
|
||||
|
||||
TRACE("WFII: ppi %p\n", W32Process);
|
||||
|
@ -3162,12 +3156,15 @@ NtUserWaitForInputIdle( IN HANDLE hProcess,
|
|||
while (TRUE);
|
||||
|
||||
WaitExit:
|
||||
KeStackAttachProcess(&Process->Pcb, &ApcState);
|
||||
for (pti = W32Process->ptiList; pti; pti = pti->ptiSibling)
|
||||
{
|
||||
pti->TIF_flags &= ~TIF_WAITFORINPUTIDLE;
|
||||
pti->pClientInfo->dwTIFlags = pti->TIF_flags;
|
||||
}
|
||||
W32Process->W32PF_flags &= ~W32PF_WAITFORINPUTIDLE;
|
||||
KeUnstackDetachProcess(&ApcState);
|
||||
|
||||
IntDereferenceProcessInfo(W32Process);
|
||||
ObDereferenceObject(Process);
|
||||
UserLeave();
|
||||
|
|
Loading…
Reference in a new issue