Ignore "minimize" event on Linux
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
parent
b348bf9b70
commit
8ac16fe827
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue