mirror of
https://github.com/reactos/reactos.git
synced 2024-05-18 03:12:06 +00:00
[NTUSER] Use call procedure handle if available (#4178)
Based on I_Kill_Bugs' patch. - Use IsCallProcHandle to check if the procedure is a call procedure handle. - If so, use the call procedure. CORE-10499
This commit is contained in:
parent
52befa1d73
commit
051561ed17
|
@ -1623,6 +1623,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
|
|||
PTHREADINFO pti = NULL;
|
||||
BOOL MenuChanged;
|
||||
BOOL bUnicodeWindow;
|
||||
PCALLPROCDATA pcpd;
|
||||
|
||||
pti = pdeskCreated ? gptiDesktopThread : GetW32ThreadInfo();
|
||||
|
||||
|
@ -1769,7 +1770,16 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
|
|||
see what problems this would cause. */
|
||||
|
||||
// Set WndProc from Class.
|
||||
pWnd->lpfnWndProc = pWnd->pcls->lpfnWndProc;
|
||||
if (IsCallProcHandle(pWnd->pcls->lpfnWndProc))
|
||||
{
|
||||
pcpd = UserGetObject(gHandleTable, pWnd->pcls->lpfnWndProc, TYPE_CALLPROC);
|
||||
if (pcpd)
|
||||
pWnd->lpfnWndProc = pcpd->pfnClientPrevious;
|
||||
}
|
||||
else
|
||||
{
|
||||
pWnd->lpfnWndProc = pWnd->pcls->lpfnWndProc;
|
||||
}
|
||||
|
||||
// GetWindowProc, test for non server side default classes and set WndProc.
|
||||
if ( pWnd->pcls->fnid <= FNID_GHOST && pWnd->pcls->fnid >= FNID_BUTTON )
|
||||
|
|
Loading…
Reference in a new issue