Skip to content
Snippets Groups Projects
Commit 0f7ef4bd authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard
Browse files

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

active.
parent f81694cc
No related branches found
No related tags found
No related merge requests found
......@@ -161,9 +161,15 @@ 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)
set_focus_window( 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;
......
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