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

Ref: https://github.com/ente-io/ente/discussions/4521
This commit is contained in:
Manav Rathi
2025-04-03 19:41:42 +05:30
parent 21fd608ed7
commit ad27bd3b35

View File

@@ -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(),
);
}
};
/**