--- a/ui/qt/window.cpp Mon Jun 16 21:21:00 2025 +0200 +++ b/ui/qt/window.cpp Mon Jun 16 21:41:55 2025 +0200 @@ -28,6 +28,7 @@ #include <cx/mempool.h> #include "../common/context.h" +#include "../common/object.h" #include "window.h" #include "menu.h" @@ -39,9 +40,7 @@ #include <QPushButton> static UiObject* create_window(const char *title, void *window_data, bool simple) { - CxMempool *mp = cxMempoolCreateSimple(256); - UiObject *obj = (UiObject*)cxCalloc(mp->allocator, 1, sizeof(UiObject)); - obj->ctx = uic_context(obj, mp); + UiObject *obj = uic_object_new_toplevel(); obj->window = window_data; obj->next = NULL;