From dc8cf1002c23704220d5cbccdd4b6eba5140a6b9 Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Tue, 4 May 1999 15:23:26 +0000 Subject: [PATCH] Fixes winproc deadlock for win16. --- if1632/thunk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/if1632/thunk.c b/if1632/thunk.c index 9a92d03b67..a5b19c597b 100644 --- a/if1632/thunk.c +++ b/if1632/thunk.c @@ -269,6 +269,7 @@ static LRESULT WINAPI THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd, WND *wndPtr = WIN_FindWndPtr( hwnd ); DWORD offset = 0; THDB *thdb = THREAD_Current(); + int iWndsLocks; /* Window procedures want ax = hInstance, ds = es = ss */ @@ -309,6 +310,8 @@ static LRESULT WINAPI THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd, } } + iWndsLocks = WIN_SuspendWndsLock(); + args = (WORD *)THREAD_STACK16(thdb) - 5; args[0] = LOWORD(lParam); args[1] = HIWORD(lParam); @@ -318,6 +321,9 @@ static LRESULT WINAPI THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd, ret = CallTo16_sreg_( &context, 5 * sizeof(WORD) ); if (offset) STACK16_POP( thdb, offset ); + + WIN_RestoreWndsLock(iWndsLocks); + return ret; }