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

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();
}
});