--- a/ui/common/wrapper.c Wed May 20 19:38:54 2026 +0200 +++ b/ui/common/wrapper.c Wed May 20 20:00:35 2026 +0200 @@ -55,6 +55,8 @@ } void ui_mainthread_object_unref(UiObject *obj) { + // TODO: detect if this is already the main thread and call + // ui_object_unref directly in that case ui_call_mainthread(obj_unref, obj); } @@ -63,6 +65,7 @@ } void ui_mainthread_document_unref(void *doc) { + // TODO: see ui_mainthread_object_unref ui_call_mainthread(doc_unref, doc); }