Create polished demo videos without editing skills. Mac/Windows/Linux
Show Recordly in the macOS Dock
youngdba1fe265656
diff --git a/electron/main.ts b/electron/main.tsindex 38f4333f..7a81199e 100644--- a/electron/main.ts+++ b/electron/main.ts@@ -528,6 +528,12 @@ function createTray() {tray.on("double-click", () => focusOrCreateMainWindow());}+function shouldUseTray() {+ // macOS exposes Recordly as a regular Dock app. Windows and Linux keep the+ // tray entry because they do not have the macOS Dock lifecycle.+ return process.platform !== "darwin";+}+function getPublicAssetPath(filename: string) {return path.join(process.env.VITE_PUBLIC || RENDERER_DIST, filename);}@@ -1002,9 +1008,14 @@ app.whenReady().then(async () => {}}, 100);});+ if (process.platform === "darwin" && app.dock) {+ await app.dock.show();+ }syncDockIcon();- createTray();- updateTrayMenu();+ if (shouldUseTray()) {+ createTray();+ updateTrayMenu();+ }setupApplicationMenu();// Ensure recordings directory existsawait ensureRecordingsDir();@@ -1031,8 +1042,10 @@ app.whenReady().then(async () => {(recording: boolean, sourceName: string) => {selectedSourceName = sourceName;setHudOverlayRecordingActive(recording);- if (!tray) createTray();- updateTrayMenu(recording);+ if (shouldUseTray()) {+ if (!tray) createTray();+ updateTrayMenu(recording);+ }if (recording) {reassertHudOverlayMouseState();}diff --git a/electron/windows.ts b/electron/windows.tsindex 8a10981f..e0fb5be2 100644--- a/electron/windows.ts+++ b/electron/windows.ts@@ -693,7 +693,12 @@ export function createUpdateToastWindow(): BrowserWindow {win.setAlwaysOnTop(true, "status");}- win.setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true });+ win.setVisibleOnAllWorkspaces(true, {+ visibleOnFullScreen: true,+ // Keep Recordly a foreground application so macOS does not temporarily+ // remove its Dock icon while showing an overlay window.+ skipTransformProcessType: process.platform === "darwin",+ });updateToastWindow = win;win.on("closed", () => {@@ -1001,7 +1006,12 @@ export function createCountdownWindow(): BrowserWindow {countdownWindow = win;- win.setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true });+ win.setVisibleOnAllWorkspaces(true, {+ visibleOnFullScreen: true,+ // Keep Recordly a foreground application so macOS does not temporarily+ // remove its Dock icon while showing the countdown.+ skipTransformProcessType: process.platform === "darwin",+ });win.webContents.on("did-finish-load", () => {if (!win.isDestroyed()) {