ui/motif/window.c

branch
newapi
changeset 176
bc63cb601f6d
parent 128
c284c15509a8
child 253
087cc9216f28
--- a/ui/motif/window.c	Mon May 22 19:44:27 2023 +0200
+++ b/ui/motif/window.c	Mon May 22 21:21:20 2023 +0200
@@ -36,6 +36,8 @@
 #include "../ui/window.h"
 #include "../common/context.h"
 
+#include <cx/basic_mempool.h>
+
 static int nwindows = 0;
 
 static int window_default_width = 600;
@@ -62,9 +64,10 @@
 }
 
 static UiObject* create_window(char *title, void *window_data, UiBool simple) {
-    UcxMempool *mp = ucx_mempool_new(256);
-    UiObject *obj = ucx_mempool_calloc(mp, 1, sizeof(UiObject));
-    obj->ctx = uic_context(obj, mp);
+    CxMempool *mp = cxBasicMempoolCreate(256);
+    const CxAllocator *a = mp->allocator;
+    UiObject *obj = cxCalloc(a, 1, sizeof(UiObject));
+    obj->ctx = uic_context(obj, a);
     obj->window = window_data;
     
     Arg args[16];

mercurial