From: Ben Soares Date: Wed, 18 Oct 2023 11:28:11 +0000 (+0100) Subject: JAL-4262 Fix the nonblockingdialog so that Jalview desktop isn't left set to alwaysOnTop X-Git-Tag: Release_2_11_4_0~132^2~11 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9aa25df997b048af1917f425646b94606d1c7183;p=jalview.git JAL-4262 Fix the nonblockingdialog so that Jalview desktop isn't left set to alwaysOnTop --- diff --git a/src/jalview/gui/JvOptionPane.java b/src/jalview/gui/JvOptionPane.java index 8edab03..7a5daf7 100644 --- a/src/jalview/gui/JvOptionPane.java +++ b/src/jalview/gui/JvOptionPane.java @@ -1334,6 +1334,7 @@ public class JvOptionPane extends JOptionPane // A better hack which works is to create a new JFrame parent with // setAlwaysOnTop(true) + boolean parentOnTop = dialogParent.isAlwaysOnTop(); dialogParent.setAlwaysOnTop(true); parentComponent = dialogParent; @@ -1341,6 +1342,8 @@ public class JvOptionPane extends JOptionPane JOPTIONPANE_MESSAGETYPE, icon, options, initialValue, modal, buttons); + dialogParent.setAlwaysOnTop(parentOnTop); + if (dispose) { dialogParent.setAlwaysOnTop(false);