Replace some SendMessage with SendNotifyMessage in case the target
window belongs to another thread.
diff --git a/windows/focus.c b/windows/focus.c
index c7842b1..3d4db25 100644
--- a/windows/focus.c
+++ b/windows/focus.c
@@ -42,7 +42,8 @@
{
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 ) )
{
diff --git a/windows/winpos.c b/windows/winpos.c
index 6a6c95d..e40840d 100644
--- a/windows/winpos.c
+++ b/windows/winpos.c
@@ -1247,14 +1247,9 @@
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 @@
{
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 );
}