feat: add exit confirmation dialog, system tray enhancements, and diagnostic options

This commit is contained in:
Claudecio Martins
2026-10-12 12:32:35 -03:00
parent 16212702cb
commit edccfff7ff
10 changed files with 527 additions and 68 deletions
@@ -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());