Reimplemented Get/SetActiveWindow, Get/SetFocus and
Get/SetForegroundWindow by storing the information in the
server. Implemented correct inter-process window activation.
diff --git a/windows/win.c b/windows/win.c
index 782d29e..516f644 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -1479,7 +1479,10 @@
/* Hide the window */
- ShowWindow( hwnd, SW_HIDE );
+ if (!ShowWindow( hwnd, SW_HIDE ))
+ {
+ if (hwnd == GetActiveWindow()) WINPOS_ActivateOtherWindow( hwnd );
+ }
if (!IsWindow(hwnd)) return TRUE;
/* Recursively destroy owned windows */
@@ -1510,8 +1513,6 @@
if (!got_one) break;
}
- WINPOS_ActivateOtherWindow( hwnd );
-
if ((owner = GetWindow( hwnd, GW_OWNER )))
{
WND *ptr = WIN_FindWndPtr( owner );
@@ -3109,7 +3110,7 @@
{
WPARAM16 wparam;
if (bInvert) wparam = !(wndPtr->flags & WIN_NCACTIVATED);
- else wparam = (hWnd == GetActiveWindow());
+ else wparam = (hWnd == GetForegroundWindow());
WIN_ReleaseWndPtr(wndPtr);
SendMessageW( hWnd, WM_NCACTIVATE, wparam, (LPARAM)0 );