--- old/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp 2016-11-23 12:53:28.000000000 +0300 +++ new/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp 2016-11-23 12:53:26.000000000 +0300 @@ -484,7 +484,10 @@ if (fgProcessID != ::GetCurrentProcessId()) { AwtWindow* window = (AwtWindow*)GetComponent(GetHWnd()); - if (window != NULL && window->IsFocusableWindow() && window->IsAutoRequestFocus() && + if (window != NULL && + window->IsFocusableWindow() && + window->IsAutoRequestFocus() && + !::IsWindowVisible(GetHWnd()) && // the window is really showing !::IsWindow(GetModalBlocker(GetHWnd()))) { // When the Java process is not allowed to set the foreground window