mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
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 commit7d8aeaf7de) (cherry picked from commite233ff9b94)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user