fix(overlay): keep macOS modal windows on fullscreen Spaces (#200)

This commit is contained in:
2026-08-15 21:43:26 -07:00
committed by GitHub
parent 2174e689a2
commit a02c33dac4
22 changed files with 568 additions and 98 deletions
+10
View File
@@ -14,6 +14,8 @@ const TRANSPORTED_APP_ARGC_ENV = 'SUBMINER_APP_ARGC';
const TRANSPORTED_APP_ARG_PREFIX = 'SUBMINER_APP_ARG_';
const MAX_TRANSPORTED_APP_ARGS = 256;
const APP_NAME = 'SubMiner';
const DEFAULT_APP_CONTROL_HANDOFF_TIMEOUT_MS = 500;
const MACOS_APP_CONTROL_HANDOFF_TIMEOUT_MS = 3000;
const MPV_LONG_OPTIONS_WITH_SEPARATE_VALUES = new Set([
'--alang',
'--audio-file',
@@ -186,6 +188,14 @@ export function shouldForwardStartupArgvViaAppControl(
return hasExplicitCommand(args);
}
export function resolveAppControlHandoffTimeoutMs(
platform: NodeJS.Platform = process.platform,
): number {
return platform === 'darwin'
? MACOS_APP_CONTROL_HANDOFF_TIMEOUT_MS
: DEFAULT_APP_CONTROL_HANDOFF_TIMEOUT_MS;
}
function readTransportedStartupArgs(env: NodeJS.ProcessEnv): string[] | null {
const rawCount = env[TRANSPORTED_APP_ARGC_ENV];
if (rawCount === undefined) {