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
+5 -2
View File
@@ -106,8 +106,11 @@ function M.create(ctx)
local function get_subtitle_ass_property()
local ass_text = mp.get_property("sub-text/ass")
if type(ass_text) == "string" and ass_text ~= "" then
return ass_text
if ass_text ~= nil then
if type(ass_text) == "string" and ass_text ~= "" then
return ass_text
end
return nil
end
ass_text = mp.get_property("sub-text-ass")
if type(ass_text) == "string" and ass_text ~= "" then
+3 -3
View File
@@ -232,7 +232,7 @@ function M.create(ctx)
elseif action_id == "triggerFieldGrouping" then
return { "--trigger-field-grouping" }
elseif action_id == "triggerSubsync" then
return { "--trigger-subsync" }
return { "--session-action", '{"actionId":"triggerSubsync"}' }
elseif action_id == "mineSentence" then
return { "--mine-sentence" }
elseif action_id == "mineSentenceMultiple" then
@@ -251,7 +251,7 @@ function M.create(ctx)
elseif action_id == "markWatched" then
return { "--mark-watched" }
elseif action_id == "openRuntimeOptions" then
return { "--open-runtime-options" }
return { "--session-action", '{"actionId":"openRuntimeOptions"}' }
elseif action_id == "openJimaku" then
return { "--open-jimaku" }
elseif action_id == "openTsukihime" or action_id == "openAnimetosho" then
@@ -259,7 +259,7 @@ function M.create(ctx)
elseif action_id == "openYoutubePicker" then
return { "--open-youtube-picker" }
elseif action_id == "openSessionHelp" then
return { "--open-session-help" }
return { "--session-action", '{"actionId":"openSessionHelp"}' }
elseif action_id == "openCharacterDictionaryManager" then
return { "--session-action", '{"actionId":"openCharacterDictionaryManager"}' }
elseif action_id == "openControllerSelect" then
+13 -1
View File
@@ -4,6 +4,7 @@ function M.create(ctx)
local mp = ctx.mp
local input = ctx.input
local process = ctx.process
local state = ctx.state
local subminer_log = ctx.log.subminer_log
local show_osd = ctx.log.show_osd
@@ -93,7 +94,18 @@ function M.create(ctx)
if not ensure_binary_for_menu() then
return
end
process.run_control_command_async("open-session-help")
process.run_binary_command_async({
state.binary_path,
"--session-action",
'{"actionId":"openSessionHelp"}',
}, function(ok, result, error)
if ok then
return
end
local reason = error or (result and result.stderr) or "unknown error"
subminer_log("warn", "session-bindings", "Session action failed: " .. tostring(reason))
show_osd("Session action failed")
end)
end)
end