Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Show/hide window when tray icon is clicked

ash4df07f032aab
diff --git a/desktop/src/main.ts b/desktop/src/main.ts
index dd6cab4a18..be11d86c39 100644
--- a/desktop/src/main.ts
+++ b/desktop/src/main.ts
@@ -680,6 +680,15 @@ const setupTrayItem = (mainWindow: BrowserWindow) => {
const tray = new Tray(trayIcon);
tray.setToolTip("Ente Photos");
tray.setContextMenu(createTrayContextMenu(mainWindow));
+ if (process.platform === "linux") {
+ tray.on("click", () => {
+ if (mainWindow.isFocused()) {
+ mainWindow.hide();
+ } else {
+ mainWindow.show();
+ }
+ });
+ }
};
/**