mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[win32k]
- Fix a problem where application that used WH_CBT hook procedures were receiving destroy window notification on windows that were never created. The window was never created because the application had returned a non zero value when it was notified of window creation, which effectively destroys the window and returns failure for window creation. See CBTProc Function on MSDN. Fixes bug #4461. svn path=/trunk/; revision=47059
This commit is contained in:
parent
0ec839d544
commit
d34a8d86bc
1 changed files with 16 additions and 0 deletions
|
@ -2468,7 +2468,23 @@ AllocErr:
|
|||
|
||||
CLEANUP:
|
||||
if (!_ret_ && Window && Window->Wnd && ti)
|
||||
{
|
||||
ULONG SavedHooks;
|
||||
/* HACK: co_UserDestroyWindow will call CBT proc with code HCBT_DESTROYWND.
|
||||
Applications can choke on this as a hwnd was never returned from this call */
|
||||
/* Save the flags */
|
||||
SavedHooks = ((PTHREADINFO)PsGetCurrentThreadWin32Thread())->fsHooks;
|
||||
|
||||
/* Temporary remove the flag */
|
||||
((PTHREADINFO)PsGetCurrentThreadWin32Thread())->fsHooks &= ~HOOKID_TO_FLAG(WH_CBT);
|
||||
|
||||
/* Destroy the window */
|
||||
co_UserDestroyWindow(Window);
|
||||
|
||||
/* Restore the flag */
|
||||
((PTHREADINFO)PsGetCurrentThreadWin32Thread())->fsHooks = SavedHooks;
|
||||
}
|
||||
|
||||
// UserFreeWindowInfo(ti, Window);
|
||||
if (Window)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue