Skip to content

armgit / ente

Public Imported from GitHub
0

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

[desktop] Show/hide the window on tray icon double click on Linux/Win

Manav Rathiad27bd3b352a
diff --git a/desktop/src/main.ts b/desktop/src/main.ts
index fcd1433d73..35d95e1b68 100644
--- a/desktop/src/main.ts
+++ b/desktop/src/main.ts
@@ -675,6 +675,14 @@ const setupTrayItem = (mainWindow: BrowserWindow) => {
const tray = new Tray(trayIcon);
tray.setToolTip("Ente Photos");
tray.setContextMenu(createTrayContextMenu(mainWindow));
+
+ // On Windows and Linux, toggle the window on double-click (Double clicks
+ // are captured by the context menu on macOS).
+ if (process.platform != "darwin") {
+ tray.on("double-click", () =>
+ mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show(),
+ );
+ }
};
/**