Fixed a problem with apps that override the default behaviour on

WM_MOUSEACTIVATE message (main window was not activated).
This commit is contained in:
Per Ångström 1999-07-04 12:46:37 +00:00 committed by Alexandre Julliard
parent 423813e30c
commit 53c2028b52
1 changed files with 4 additions and 3 deletions

View File

@ -316,7 +316,7 @@ static DWORD MSG_ProcessMouseMsg( MSG *msg, BOOL remove, INT16 hittest,
/* Activate the window if needed */ /* Activate the window if needed */
if (hWnd != GetActiveWindow() && hWnd != GetDesktopWindow()) if (hwndTop != GetForegroundWindow() && hwndTop != GetDesktopWindow())
{ {
LONG ret = SendMessageA( hWnd, WM_MOUSEACTIVATE, hwndTop, LONG ret = SendMessageA( hWnd, WM_MOUSEACTIVATE, hwndTop,
MAKELONG( hittest, message ) ); MAKELONG( hittest, message ) );
@ -324,10 +324,11 @@ static DWORD MSG_ProcessMouseMsg( MSG *msg, BOOL remove, INT16 hittest,
if ((ret == MA_ACTIVATEANDEAT) || (ret == MA_NOACTIVATEANDEAT)) if ((ret == MA_ACTIVATEANDEAT) || (ret == MA_NOACTIVATEANDEAT))
eatMsg = TRUE; eatMsg = TRUE;
if (((ret == MA_ACTIVATE) || (ret == MA_ACTIVATEANDEAT)) if (((ret == MA_ACTIVATE) || (ret == MA_ACTIVATEANDEAT)))
&& hwndTop != GetActiveWindow() ) {
if (!WINPOS_SetActiveWindow( hwndTop, TRUE , TRUE )) if (!WINPOS_SetActiveWindow( hwndTop, TRUE , TRUE ))
eatMsg = TRUE; eatMsg = TRUE;
}
} }
} }
} else sendSC = (remove && sendSC); } else sendSC = (remove && sendSC);