mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-16 13:55:51 -07:00
fix(overlay): keep macOS modal windows on fullscreen Spaces (#200)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user