update 2023/7/22
parent
080100a311
commit
cc72ddc8f8
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
package com.zhangmeng.tools.views;
|
||||
|
||||
import com.sun.javafx.PlatformUtil;
|
||||
import com.zhangmeng.tools.utils.ImagePath;
|
||||
import com.zhangmeng.tools.utils.ResourcesUtils;
|
||||
import javafx.application.Application;
|
||||
|
|
@ -59,6 +60,13 @@ public class HomeView extends Application {
|
|||
primaryStage.show();
|
||||
|
||||
primaryStage.setOnCloseRequest(event -> {
|
||||
|
||||
if (PlatformUtil.isWindows()){
|
||||
primaryStage.setIconified(true);
|
||||
event.consume();
|
||||
return;
|
||||
}
|
||||
|
||||
Platform.setImplicitExit(true);
|
||||
try {
|
||||
SystemTray systemTray = SystemTray.getSystemTray();
|
||||
|
|
|
|||
Loading…
Reference in New Issue