Commit c95959dc authored by Kevin Koltzau's avatar Kevin Koltzau Committed by Alexandre Julliard

Fix bug with chained messages.

parent 3f6c0887
......@@ -158,7 +158,7 @@ typedef struct
SUBCLASSPROCS *SubclassProcs;
SUBCLASSPROCS *stackpos;
WNDPROC origproc;
BOOL running;
int running;
} SUBCLASS_INFO, *LPSUBCLASS_INFO;
/* undocumented functions */
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment