Skip to content

Commit 61ed2a2

Browse files
authored
"Show/Hide" tray action shows window from background instead of hiding it. (element-hq#312)
1 parent 8fd24d2 commit 61ed2a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tray.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function destroy(): void {
3636
}
3737

3838
function toggleWin(): void {
39-
if (global.mainWindow.isVisible() && !global.mainWindow.isMinimized()) {
39+
if (global.mainWindow.isVisible() && !global.mainWindow.isMinimized() && global.mainWindow.isFocused()) {
4040
global.mainWindow.hide();
4141
} else {
4242
if (global.mainWindow.isMinimized()) global.mainWindow.restore();

0 commit comments

Comments
 (0)