ui/motif/widget.c

changeset 595
e62047c59658
parent 554
28e490aa15e3
child 808
2b0ecad00872
--- a/ui/motif/widget.c	Thu May 29 12:03:32 2025 +0200
+++ b/ui/motif/widget.c	Thu May 29 13:23:11 2025 +0200
@@ -37,7 +37,7 @@
 #include "../common/object.h"
 
 
-UIWIDGET ui_customwidget_create(UiObject *obj, ui_createwidget_func create_widget, void *userdata, UiWidgetArgs args) {
+UIWIDGET ui_customwidget_create(UiObject *obj, ui_createwidget_func create_widget, void *userdata, UiWidgetArgs *args) {
     Arg xargs[64];
     int n = 0;
     
@@ -56,12 +56,11 @@
 UIEXPORT UIWIDGET ui_separator_create(UiObject *obj, UiWidgetArgs *args) {
     Arg xargs[64];
     int n = 0;
-    UiWidgetArgs a = *args;
     
     UiContainerPrivate *ctn = ui_obj_container(obj);
-    UI_APPLY_LAYOUT(ctn->layout, a);
+    UI_APPLY_LAYOUT(ctn->layout, args);
     
-    char *name = a.name ? (char*)a.name : "separator";
+    char *name = args->name ? (char*)args->name : "separator";
     Widget parent = ctn->prepare(ctn, xargs, &n);
     Widget widget = XmCreateSeparator(parent, name, xargs, n);
     XtManageChild(widget);

mercurial