From 9aa25df997b048af1917f425646b94606d1c7183 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 18 Oct 2023 12:28:11 +0100 Subject: [PATCH] JAL-4262 Fix the nonblockingdialog so that Jalview desktop isn't left set to alwaysOnTop --- src/jalview/gui/JvOptionPane.java | 3 +++ 1 file changed, 3 insertions(+) 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); -- 1.7.10.2