From 975e33c206c43b06b2a520f6e7966648ff67ec63 Mon Sep 17 00:00:00 2001 From: Anton Tarasov Date: Thu, 5 May 2016 12:29:17 +0300 Subject: IDEA-139971 Cannot use IDEA and Dragon Naturally Speaking together The bug mirrors Oracle bug: JDK-8140525. Comments: https://bugs.openjdk.java.net/browse/JDK-8140525?focusedCommentId=13865151&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13865151 --- src/windows/native/sun/windows/awt_Frame.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/windows') diff --git a/src/windows/native/sun/windows/awt_Frame.cpp b/src/windows/native/sun/windows/awt_Frame.cpp index 53f6a50149..87a53fd789 100644 --- a/src/windows/native/sun/windows/awt_Frame.cpp +++ b/src/windows/native/sun/windows/awt_Frame.cpp @@ -484,7 +484,10 @@ MsgRouting AwtFrame::WmShowWindow(BOOL show, UINT status) 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 -- cgit v1.2.3