3
0
mirror of https://github.com/britzl/monarch.git synced 2025-11-26 10:50:55 +01:00

Compare commits

...

2 Commits
3.6.0 ... 3.7.0

Author SHA1 Message Date
Björn Ritzl
6fe59c92c4 Make sure to force unload a preloaded screen 2022-07-23 00:09:51 +02:00
Björn Ritzl
286a270a1c Check if screen was loaded before trying to unload 2022-07-05 22:54:40 +02:00

View File

@@ -354,8 +354,10 @@ local function unload(screen, force)
if screen.proxy then
log("unload() proxy", screen.id)
if screen.auto_preload and not force then
msg.post(screen.proxy, DISABLE)
screen.loaded = false
if screen.loaded then
msg.post(screen.proxy, DISABLE)
screen.loaded = false
end
screen.preloaded = true
else
screen.wait_for = PROXY_UNLOADED
@@ -1085,7 +1087,7 @@ function M.unload(id, cb)
end
run_coroutine(screen, when_unloaded, function()
change_context(screen)
unload(screen)
unload(screen, true)
end)
end)
return true -- return true for legacy reasons (before queue existed)