Commit 0f7ef4bd authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Do not change focus if the being activated window is no longer

active.
parent f81694cc
......@@ -161,10 +161,16 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
/* now change focus if necessary */
if (focus)
{
HWND curfocus = GetFocus();
if (!curfocus || !hwnd || GetAncestor( curfocus, GA_ROOT ) != hwnd)
GUITHREADINFO info;
GetGUIThreadInfo( GetCurrentThreadId(), &info );
/* Do not change focus if the window is no more active */
if (hwnd == info.hwndActive)
{
if (!info.hwndFocus || !hwnd || GetAncestor( info.hwndFocus, GA_ROOT ) != hwnd)
set_focus_window( hwnd );
}
}
return TRUE;
}
......
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