Show Recordly in the macOS Dock

This commit is contained in:
young committed 2026-08-25 19:04:38 +10:00
1 parent bfe1de884a
commit dba1fe2656
2 files changed
+29 -6

No files matched your search

+17 -4
View File
@@ -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 exists
await 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();
}
+12 -2
View File
@@ -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()) {