mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-24 02:09:43 +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) {
|
if (nCmdShow == SW_SHOWNA || m_isIgnoringMouseEvents) {
|
||||||
flags |= SWP_NOACTIVATE;
|
flags |= SWP_NOACTIVATE;
|
||||||
}
|
}
|
||||||
// This flag allows the toplevel to be bellow other process toplevels.
|
HWND hInsertAfter = HWND_TOP;
|
||||||
// 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;
|
|
||||||
if (m_isIgnoringMouseEvents) {
|
if (m_isIgnoringMouseEvents) {
|
||||||
HWND hFgWindow = ::GetForegroundWindow();
|
HWND hFgWindow = ::GetForegroundWindow();
|
||||||
HWND hOwner = ::GetWindow(GetHWnd(), GW_OWNER);
|
HWND hOwner = ::GetWindow(GetHWnd(), GW_OWNER);
|
||||||
|
|||||||
Reference in New Issue
Block a user