diff -r 724c7036a03e -r 3f0c9fe60c68 ui/win32/window.c --- a/ui/win32/window.c Mon Jun 16 21:21:00 2025 +0200 +++ b/ui/win32/window.c Mon Jun 16 21:41:55 2025 +0200 @@ -29,6 +29,8 @@ #include "window.h" #include "Windows.h" +#include "../common/object.h" + #include #include @@ -67,10 +69,7 @@ } static UiObject* create_window(const char *title, void *window_data, bool simple) { - CxMempool *mp = cxMempoolCreateSimple(256); - const CxAllocator *a = mp->allocator; - UiObject *obj = cxCalloc(a, 1, sizeof(UiObject)); - obj->ctx = uic_context(obj, mp); + UiObject *obj = uic_object_new_toplevel(); obj->window = window_data; HWND hwnd = CreateWindowEx(