revert: JBR-1434 "New file dialog" popup remains above all windows on switching application

java.awt.peer.WindowPeer.isLightweightDialog() method does not exist.

(cherry picked from commit 7d8aeaf7de)
(cherry picked from commit e233ff9b94)
This commit is contained in:
Anton Tarasov
2021-02-20 11:23:43 +03:00
committed by jbrbot
parent 7098c5d125
commit e65c5842aa

View File

@@ -833,19 +833,7 @@ void AwtWindow::Show()
if (nCmdShow == SW_SHOWNA || m_isIgnoringMouseEvents) {
flags |= SWP_NOACTIVATE;
}
// This flag allows the toplevel to be bellow other process toplevels.
// This behaviour is preferable for popups, but it is not appropriate
// for menus
BOOL isLightweightDialog = TRUE;
jclass windowPeerClass = env->FindClass("java/awt/peer/WindowPeer");
if (windowPeerClass != NULL) {
jmethodID isLightweightDialogMID = env->GetStaticMethodID(windowPeerClass, "isLightweightDialog", "(Ljava/awt/Window;)Z");
if (isLightweightDialogMID != NULL) {
isLightweightDialog = env->CallStaticBooleanMethod(windowPeerClass, isLightweightDialogMID, target);
}
}
HWND hInsertAfter = isLightweightDialog ? HWND_TOP : HWND_TOPMOST;
HWND hInsertAfter = HWND_TOP;
if (m_isIgnoringMouseEvents) {
HWND hFgWindow = ::GetForegroundWindow();
HWND hOwner = ::GetWindow(GetHWnd(), GW_OWNER);