File tree Expand file tree Collapse file tree
HMCL/src/main/java/org/jackhuang/hmcl/game Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5252import org .jackhuang .hmcl .util .platform .*;
5353import org .jackhuang .hmcl .util .versioning .GameVersionNumber ;
5454import org .jackhuang .hmcl .util .versioning .VersionNumber ;
55+ import org .jetbrains .annotations .Nullable ;
5556
5657import java .io .FileNotFoundException ;
5758import java .io .IOException ;
@@ -760,7 +761,10 @@ private void checkExit() {
760761 case HIDE_AND_REOPEN :
761762 runLater (() -> {
762763 Optional .ofNullable (Controllers .getStage ())
763- .ifPresent (Stage ::show );
764+ .ifPresent (stage -> {
765+ stage .setIconified (false );
766+ stage .show ();
767+ });
764768 });
765769 break ;
766770 case KEEP :
@@ -895,8 +899,10 @@ private void finishLaunch() {
895899 runLater (() -> {
896900 // If application was stopped and execution services did not finish termination,
897901 // these codes will be executed.
898- if (Controllers .getStage () != null ) {
899- Controllers .getStage ().hide ();
902+ @ Nullable Stage stage = Controllers .getStage ();
903+ if (stage != null ) {
904+ stage .setIconified (false );
905+ stage .hide ();
900906 launchingLatch .countDown ();
901907 }
902908 });
You can’t perform that action at this time.
0 commit comments