--- a/ui/motif/menu.c Sun Dec 15 11:59:30 2024 +0100 +++ b/ui/motif/menu.c Sun Dec 15 22:13:05 2024 +0100 @@ -129,6 +129,24 @@ if(s) { XmStringFree(s); } + + if(it->callback) { + UiEventData *eventdata = malloc(sizeof(UiEventData)); + eventdata->callback = it->callback; + eventdata->userdata = it->userdata; + eventdata->obj = obj; + eventdata->value = 0; + XtAddCallback( + mitem, + XmNactivateCallback, + (XtCallbackProc)ui_push_button_callback, + eventdata); + XtAddCallback( + mitem, + XmNdestroyCallback, + (XtCallbackProc)ui_destroy_eventdata, + eventdata); + } } void add_menuseparator_widget(Widget p, int i, UiMenuItemI *item, UiObject *obj) {