From fba2298ae0ff5f3f737f7e14439b3211b0b1baf8 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Fri, 9 Nov 2018 16:44:32 +0000 Subject: [PATCH] JAL-1988 This fixes the Quit response when user cancels the quit --- src/jalview/gui/Desktop.java | 4 ++++ 1 file changed, 4 insertions(+) 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); // } -- 1.7.10.2