From c95959dc7f1f568b7c8ad4265888daeddffd0969 Mon Sep 17 00:00:00 2001 From: Kevin Koltzau Date: Mon, 6 Sep 2004 20:26:04 +0000 Subject: [PATCH] Fix bug with chained messages. --- dlls/comctl32/comctl32.h | 2 +- dlls/comctl32/commctrl.c | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h index d11d01fe54..221147011b 100644 --- a/dlls/comctl32/comctl32.h +++ b/dlls/comctl32/comctl32.h @@ -158,7 +158,7 @@ typedef struct SUBCLASSPROCS *SubclassProcs; SUBCLASSPROCS *stackpos; WNDPROC origproc; - BOOL running; + int running; } SUBCLASS_INFO, *LPSUBCLASS_INFO; /* undocumented functions */ diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index b69ffa1d28..ad91b8a3d8 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -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; -- 2.32.0.93.g670b81a890