From: Ben Soares Date: Fri, 9 Nov 2018 16:44:32 +0000 (+0000) Subject: JAL-1988 This fixes the Quit response when user cancels the quit X-Git-Tag: Release_2_11_0~17^2~7^2~58^2~20 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fba2298ae0ff5f3f737f7e14439b3211b0b1baf8;p=jalview.git JAL-1988 This fixes the Quit response when user cancels the quit --- diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 4d00b1f..c2eb598 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -67,6 +67,7 @@ import java.awt.desktop.PreferencesHandler; import java.awt.desktop.QuitEvent; import java.awt.desktop.QuitHandler; import java.awt.desktop.QuitResponse; +import java.awt.desktop.QuitStrategy; import java.awt.dnd.DnDConstants; import java.awt.dnd.DropTargetDragEvent; import java.awt.dnd.DropTargetDropEvent; @@ -395,13 +396,16 @@ public class Desktop extends jalview.jbgui.GDesktop { System.out.println("Shortcut Quit confirmed by user"); quit(); + r.performQuit(); // probably won't reach this line, but just in case } else { + r.cancelQuit(); System.out.println("Shortcut Quit cancelled by user"); } } }); + hdesktop.setQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS); // }