Disable remapping of 'minimize' to 'close'
This commit is contained in:
parent
e8d226766d
commit
1c670977d3
1 changed files with 0 additions and 22 deletions
22
app/main.ts
22
app/main.ts
|
@ -887,28 +887,6 @@ async function createWindow() {
|
||||||
app.quit();
|
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.
|
// Emitted when the window is closed.
|
||||||
mainWindow.on('closed', () => {
|
mainWindow.on('closed', () => {
|
||||||
// Dereference the window object, usually you would store windows
|
// Dereference the window object, usually you would store windows
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue