Skip to content
Snippets Groups Projects
Commit 392f6f87 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard
Browse files

Replace some SendMessage with SendNotifyMessage in case the target

window belongs to another thread.
parent a5e9bf73
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,8 @@ void FOCUS_SwitchFocus( MESSAGEQUEUE *pMsgQ, HWND hFocusFrom, HWND hFocusTo )
{
PERQDATA_SetFocusWnd( pMsgQ->pQData, hFocusTo );
if (hFocusFrom) SendMessageA( hFocusFrom, WM_KILLFOCUS, (WPARAM)hFocusTo, 0 );
if (hFocusFrom)
SendNotifyMessageA( hFocusFrom, WM_KILLFOCUS, (WPARAM)hFocusTo, 0 );
if( !hFocusTo || hFocusTo != PERQDATA_GetFocusWnd( pMsgQ->pQData ) )
{
......
......@@ -1247,14 +1247,9 @@ BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus)
if ((hwndPrevActive = hwndActive) && IsWindow(hwndPrevActive))
{
MESSAGEQUEUE *pTempActiveQueue = 0;
if (!SendMessageA( hwndPrevActive, WM_NCACTIVATE, FALSE, 0 ))
{
if (GetSysModalWindow16() != WIN_Handle16(hWnd)) goto CLEANUP_END;
/* disregard refusal if hWnd is sysmodal */
}
SendMessageA( hwndPrevActive, WM_ACTIVATE,
SendNotifyMessageA( hwndPrevActive, WM_NCACTIVATE, FALSE, 0 );
SendNotifyMessageA( hwndPrevActive, WM_ACTIVATE,
MAKEWPARAM( WA_INACTIVE, wIconized ),
(LPARAM)hWnd );
......@@ -1321,7 +1316,7 @@ BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus)
{
if (!IsWindow( *phwnd )) continue;
if (GetWindowThreadProcessId( *phwnd, NULL ) == old_thread)
SendMessageW( *phwnd, WM_ACTIVATEAPP, 0, new_thread );
SendNotifyMessageW( *phwnd, WM_ACTIVATEAPP, 0, new_thread );
}
HeapFree( GetProcessHeap(), 0, list );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment