mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 15:45:23 +00:00
fix(electron): allow explicit quit with active connections (#1522)
This commit is contained in:
1 parent
4c2f54dac0
commit
5860921cbe
2 files changed
+103
No files matched your search
@@ -1546,6 +1546,12 @@ function createWindow() {
|
||||
console.log("Frontend loaded successfully");
|
||||
});
|
||||
|
||||
mainWindow.webContents.on("will-prevent-unload", (event) => {
|
||||
// Explicit Quit must not be vetoed by the renderer's connection guard.
|
||||
// In this Electron event, preventDefault allows the unload to proceed.
|
||||
if (isQuitting) event.preventDefault();
|
||||
});
|
||||
|
||||
mainWindow.on("close", (event) => {
|
||||
if (!isQuitting && tray && !tray.isDestroyed()) {
|
||||
event.preventDefault();
|
||||
|
||||
Reference in new issue
Block a user