From 1b33d2e45c7cedc0c58b7f78fbf35a742b1a1a05 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Tue, 3 Oct 2023 18:31:08 +0100 Subject: [PATCH] JAL-4001 Only use acquireDialogQueue and releaseDialogQueue when SplashScreen is transient. Fixes macOS About dialog --- src/jalview/gui/SplashScreen.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/SplashScreen.java b/src/jalview/gui/SplashScreen.java index ff409e0..52c1d18 100755 --- a/src/jalview/gui/SplashScreen.java +++ b/src/jalview/gui/SplashScreen.java @@ -113,8 +113,11 @@ public class SplashScreen extends JPanel */ public SplashScreen(boolean isTransient) { - Desktop.instance.acquireDialogQueue(); this.transientDialog = isTransient; + if (this.transientDialog) + { + Desktop.instance.acquireDialogQueue(); + } if (Platform.isJS()) // BH 2019 { @@ -228,7 +231,8 @@ public class SplashScreen extends JPanel protected boolean refreshText() { String newtext = Desktop.instance.getAboutMessage(); - // jalview.bin.Console.errPrintln("Text found: \n"+newtext+"\nEnd of newtext."); + // jalview.bin.Console.errPrintln("Text found: \n"+newtext+"\nEnd of + // newtext."); if (oldTextLength != newtext.length()) { iframe.setVisible(false); @@ -324,7 +328,6 @@ public class SplashScreen extends JPanel } closeSplash(); - Desktop.instance.releaseDialogQueue(); } /** @@ -332,6 +335,10 @@ public class SplashScreen extends JPanel */ public void closeSplash() { + if (this.transientDialog) + { + Desktop.instance.releaseDialogQueue(); + } try { -- 1.7.10.2