From 1c670977d3d6cde61c6d372eaadbe52e51ecfc81 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Mon, 19 Sep 2022 13:37:47 -0700 Subject: [PATCH] Disable remapping of 'minimize' to 'close' --- app/main.ts | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/app/main.ts b/app/main.ts index 683fd5f9df..25c3067c75 100644 --- a/app/main.ts +++ b/app/main.ts @@ -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