Ignore "minimize" event on Linux

This commit is contained in:
Fedor Indutny 2022-09-15 11:34:51 -07:00 committed by GitHub
parent 635840cd99
commit a6a80cebe9
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();
}
});