From 9ffcd97bb66f4b9e78606699aa544f23faa474f4 Mon Sep 17 00:00:00 2001 From: MarvNC Date: Mon, 7 Aug 2023 10:11:50 -0700 Subject: [PATCH] Show on current mac workspace --- src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/index.ts b/src/index.ts index df89329..dfa8776 100644 --- a/src/index.ts +++ b/src/index.ts @@ -143,6 +143,13 @@ function toggleWindow() { if (window!.isFocused()) { window!.hide(); } else { + // show on active workspace for mac + if (process.platform === 'darwin') { + window!.setVisibleOnAllWorkspaces(true); + window!.show(); + window!.setVisibleOnAllWorkspaces(false); + } + // show on current monitor const currentScreen = screen.getDisplayNearestPoint(screen.getCursorScreenPoint()); const isWindowOnCurrentScreen = currentScreen.bounds.x <= window!.getPosition()[0] &&