Do not change focus if the being activated window is no longer
active.
This commit is contained in:
parent
f81694cc0c
commit
0f7ef4bd8d
|
@ -161,9 +161,15 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||||
/* now change focus if necessary */
|
/* now change focus if necessary */
|
||||||
if (focus)
|
if (focus)
|
||||||
{
|
{
|
||||||
HWND curfocus = GetFocus();
|
GUITHREADINFO info;
|
||||||
if (!curfocus || !hwnd || GetAncestor( curfocus, GA_ROOT ) != hwnd)
|
|
||||||
set_focus_window( hwnd );
|
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;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in New Issue