[client] app: free the frame event after display server teardown
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled

Display server and overlay teardown can still call app_invalidateWindow,
which signals the frame event; the Wayland presentation module does so
when it unregisters its graph. Freeing the event beforehand asserted in
lgSignalEvent while closing the client.
This commit is contained in:
Amit Mendapara
2026-08-12 07:09:28 +05:30
committed by Geoffrey McRae
parent 9469c087c9
commit ada355e429

View File

@@ -3557,12 +3557,6 @@ static void lg_shutdown(void)
lgAudio_free();
lgClipboard_setLocalAvailable(false);
if (g_state.frameEvent)
{
lgFreeEvent(g_state.frameEvent);
g_state.frameEvent = NULL;
}
if (e_startup)
{
lgFreeEvent(e_startup);
@@ -3587,6 +3581,13 @@ static void lg_shutdown(void)
g_state.overlays = NULL;
}
// app_invalidateWindow runs during display server and overlay teardown
if (g_state.frameEvent)
{
lgFreeEvent(g_state.frameEvent);
g_state.frameEvent = NULL;
}
renderQueue_setSourceFns(NULL, NULL, NULL, NULL);
renderQueue_free();
LG_LOCK_FREE(g_state.videoSourceLock);