Disable remapping of 'minimize' to 'close'

This commit is contained in:
Fedor Indutny 2022-09-19 13:37:47 -07:00 committed by GitHub
parent e8d226766d
commit 1c670977d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 22 deletions

View File

@ -887,28 +887,6 @@ async function createWindow() {
app.quit();
});
mainWindow.on('minimize', async () => {
// Some window managers minimize Signal when tabbing to other window.
if (OS.isLinux()) {
return;
}
if (!mainWindow) {
getLogger().info('minimize event: no main window');
return;
}
// When tray icon is in use - close the window since it will be minimized
// to tray anyway.
const usingTrayIcon = shouldMinimizeToSystemTray(
await systemTraySettingCache.get()
);
if (usingTrayIcon) {
getLogger().info('minimize event: closing main window');
mainWindow.close();
}
});
// Emitted when the window is closed.
mainWindow.on('closed', () => {
// Dereference the window object, usually you would store windows