Skip to content

Commit

Permalink
Ignore "minimize" event on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Sep 15, 2022
1 parent 635840c commit a6a80ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -899,6 +904,7 @@ async function createWindow() {
await systemTraySettingCache.get()
);
if (usingTrayIcon) {
getLogger().info('minimize event: closing main window');
mainWindow.close();
}
});
Expand Down

0 comments on commit a6a80ce

Please sign in to comment.