Commit 7d7fe7c1 authored by Francois Boisvert's avatar Francois Boisvert Committed by Alexandre Julliard

Suspend the window locks before DefKeybEventProc and

DefMouseEventProc.
parent 8de3ba8f
......@@ -79,6 +79,7 @@ void KEYBOARD_SendEvent( BYTE bVk, BYTE bScan, DWORD dwFlags,
DWORD posX, DWORD posY, DWORD time )
{
WINE_KEYBDEVENT wke;
int iWndsLocks;
if ( !DefKeybEventProc ) return;
......@@ -89,7 +90,11 @@ void KEYBOARD_SendEvent( BYTE bVk, BYTE bScan, DWORD dwFlags,
wke.posY = posY;
wke.time = time;
/* To avoid deadlocks, we have to suspend all locks on windows structures
before the program control is passed to the keyboard driver */
iWndsLocks = WIN_SuspendWndsLock();
DefKeybEventProc( bVk, bScan, dwFlags, (DWORD)&wke );
WIN_RestoreWndsLock(iWndsLocks);
}
/**********************************************************************
......
......@@ -58,6 +58,7 @@ void MOUSE_SendEvent( DWORD mouseStatus, DWORD posX, DWORD posY,
{
int width = MONITOR_GetWidth (&MONITOR_PrimaryMonitor);
int height = MONITOR_GetHeight(&MONITOR_PrimaryMonitor);
int iWndsLocks;
WINE_MOUSEEVENT wme;
BOOL bOldWarpPointer;
......@@ -75,6 +76,10 @@ void MOUSE_SendEvent( DWORD mouseStatus, DWORD posX, DWORD posY,
wme.hWnd = hWnd;
bOldWarpPointer = MOUSE_Driver->pEnableWarpPointer(FALSE);
/* To avoid deadlocks, we have to suspend all locks on windows structures
before the program control is passed to the mouse driver */
iWndsLocks = WIN_SuspendWndsLock();
DefMouseEventProc( mouseStatus, posX, posY, 0, (DWORD)&wme );
WIN_RestoreWndsLock(iWndsLocks);
MOUSE_Driver->pEnableWarpPointer(bOldWarpPointer);
}
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