feat: add exit confirmation dialog, system tray enhancements, and diagnostic options
This commit is contained in:
+14
@@ -36,6 +36,17 @@ public class CyberCoreSignerApplication {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// Previne conflitos nativos de UI Automation/Acessibilidade do Glass no Windows 11
|
||||
if (System.getProperty("javafx.accessibility") == null) {
|
||||
System.setProperty("javafx.accessibility", "false");
|
||||
}
|
||||
if (System.getProperty("glass.accessible.force") == null) {
|
||||
System.setProperty("glass.accessible.force", "false");
|
||||
}
|
||||
Thread.setDefaultUncaughtExceptionHandler((thread, throwable) -> {
|
||||
logger.error("Exceção não tratada na thread '{}': {}", thread.getName(), throwable.getMessage(), throwable);
|
||||
});
|
||||
|
||||
parseArguments(args);
|
||||
printBanner();
|
||||
|
||||
@@ -67,6 +78,9 @@ public class CyberCoreSignerApplication {
|
||||
try {
|
||||
logger.info("Iniciando interface gráfica desktop...");
|
||||
CyberCoreDesktopApplication.setDevelopmentMode(developmentMode);
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() ->
|
||||
logger.warn("JVM em encerramento (sinal externo, System.exit ou fim do aplicativo)."),
|
||||
"cybercore-shutdown-diagnostic"));
|
||||
Application.launch(CyberCoreDesktopApplication.class, args);
|
||||
} catch (Throwable t) {
|
||||
logger.warn("Não foi possível inicializar ambiente gráfico ({}). Continuando em modo console.", t.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user