1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix Ctrl-Q bug

Signed-off-by: Pavel Ashevskii <pashevskii@mirantis.com>
This commit is contained in:
Pavel Ashevskii 2020-11-17 14:34:00 +04:00
parent 532b10e357
commit b8d0421799

View File

@ -93,10 +93,9 @@ app.on("activate", (event, hasVisibleWindows) => {
} }
}); });
// Quit app on Cmd+Q (MacOS) // Prevent app.exit() on closing all windows
app.on("will-quit", (event) => { app.on("window-all-closed", () => {
logger.info('APP:QUIT'); logger.info('APP:CLOSE');
event.preventDefault(); // prevent app's default shutdown (e.g. required for telemetry, etc.)
clusterManager?.stop(); // close cluster connections clusterManager?.stop(); // close cluster connections
return; // skip exit to make tray work, to quit go to app's global menu or tray's menu return; // skip exit to make tray work, to quit go to app's global menu or tray's menu
}) })