# HG changeset patch # User Olaf Wintermann # Date 1780229371 -7200 # Node ID 066fc6df92d1c832410fe3cc765dfc9db501d0c6 # Parent 8f44450932d5a5ca355c5661501cf15a3e8a2b55 add ui_mainthread_app_unref diff -r 8f44450932d5 -r 066fc6df92d1 ui/common/wrapper.c --- a/ui/common/wrapper.c Sat May 30 21:18:29 2026 +0200 +++ b/ui/common/wrapper.c Sun May 31 14:09:31 2026 +0200 @@ -71,6 +71,14 @@ ui_call_mainthread(doc_unref, doc); } +static int app_unref(void *unused) { + ui_app_unref(); + return 0; +} + +void ui_mainthread_app_unref() { + ui_call_mainthread(app_unref, NULL); +} /* ---------------------------- UiList ---------------------------- */ diff -r 8f44450932d5 -r 066fc6df92d1 ui/common/wrapper.h --- a/ui/common/wrapper.h Sat May 30 21:18:29 2026 +0200 +++ b/ui/common/wrapper.h Sun May 31 14:09:31 2026 +0200 @@ -44,6 +44,7 @@ UIEXPORT void ui_mainthread_object_unref(UiObject *obj); UIEXPORT void ui_mainthread_document_unref(void *doc); +UIEXPORT void ui_mainthread_app_unref(); UIEXPORT void* ui_list_get_data(UiList *list); UIEXPORT void* ui_list_get_iter(UiList *list);