Ignore "minimize" event on Linux

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2022-09-15 16:00:25 -07:00 committed by GitHub
parent b348bf9b70
commit 8ac16fe827
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -888,6 +888,11 @@ async function createWindow() {
});
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;
@ -899,6 +904,7 @@ async function createWindow() {
await systemTraySettingCache.get()
);
if (usingTrayIcon) {
getLogger().info('minimize event: closing main window');
mainWindow.close();
}
});