Fix bug with chained messages.

This commit is contained in:
Kevin Koltzau 2004-09-06 20:26:04 +00:00 committed by Alexandre Julliard
parent 3f6c088767
commit c95959dc7f
2 changed files with 6 additions and 7 deletions

View File

@ -158,7 +158,7 @@ typedef struct
SUBCLASSPROCS *SubclassProcs;
SUBCLASSPROCS *stackpos;
WNDPROC origproc;
BOOL running;
int running;
} SUBCLASS_INFO, *LPSUBCLASS_INFO;
/* undocumented functions */

View File

@ -1288,9 +1288,9 @@ LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
/* Save our old stackpos to properly handle nested messages */
proc = stack->stackpos;
stack->stackpos = stack->SubclassProcs;
stack->running = TRUE;
stack->running++;
ret = DefSubclassProc(hWnd, uMsg, wParam, lParam);
stack->running = FALSE;
stack->running--;
stack->stackpos = proc;
if (!stack->SubclassProcs) {
@ -1344,12 +1344,11 @@ LRESULT WINAPI DefSubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
else
ret = CallWindowProcA (stack->origproc, hWnd, uMsg, wParam, lParam);
} else {
SUBCLASSPROCS proc;
memcpy(&proc, stack->stackpos, sizeof(proc));
LPSUBCLASSPROCS proc = stack->stackpos;
stack->stackpos = stack->stackpos->next;
/* call the Subclass procedure from the stack */
ret = proc.subproc (hWnd, uMsg, wParam, lParam,
proc.id, proc.ref);
ret = proc->subproc (hWnd, uMsg, wParam, lParam,
proc->id, proc->ref);
}
return ret;