--- a/ui/motif/container.c Fri Dec 11 11:47:30 2020 +0100 +++ b/ui/motif/container.c Sun May 23 09:44:43 2021 +0200 @@ -168,7 +168,7 @@ if(bc->prev_widget) { int v = 0; - XtVaGetValues(bc->prev_widget, d2, &v, 0); + XtVaGetValues(bc->prev_widget, d2, &v, NULL); if(v == XmATTACH_FORM) { XtVaSetValues( bc->prev_widget, @@ -176,14 +176,14 @@ XmATTACH_WIDGET, w2, widget, - 0); + NULL); XtVaSetValues( widget, d1, XmATTACH_NONE, d2, XmATTACH_FORM, - 0); + NULL); } } bc->prev_widget = widget; @@ -259,7 +259,7 @@ &widget_width, XmNheight, &widget_height, - 0); + NULL); // get the maximum height in this row if(widget_height > rheight) { @@ -667,8 +667,8 @@ content->widget = NULL; // initialization for uic_context() content->ctx = uic_context(content, view->ctx->mempool); content->ctx->parent = view->ctx; - content->ctx->set_document = ui_tab_set_document; - content->ctx->detach_document = ui_tab_detach_document; + content->ctx->attach_document = uic_context_attach_document; + content->ctx->detach_document2 = uic_context_detach_document2; content->widget = frame; content->window = view->ctx->obj->window; content->container = ui_frame_container(content, frame); @@ -726,7 +726,8 @@ void ui_change_tab(MotifTabbedPane *pane, UiTab *tab) { UiContext *ctx = tab->content->ctx; - ctx->parent->set_document(ctx->parent, ctx->document); + ctx->parent->detach_document2(ctx->parent, pane->current->content->ctx->document); + ctx->parent->attach_document(ctx->parent, ctx->document); if(pane->current) { XtVaSetValues(pane->current->tab_button, XmNshadowThickness, 0, XmNbackground, pane->bg1, NULL); @@ -750,7 +751,7 @@ if(ctx->parent->document) { //ctx->parent->detach_document(ctx->parent, ctx->parent->document); } - uic_context_set_document(ctx, document); + uic_context_attach_document(ctx, document); //uic_context_set_document(ctx->parent, document); //ctx->parent->document = document; @@ -762,16 +763,13 @@ NULL); if(tab) { if(tab->tabbedpane->current == tab) { - ctx->parent->set_document(ctx->parent, ctx->document); + ctx->parent->attach_document(ctx->parent, ctx->document); } } else { fprintf(stderr, "UiError: ui_bar_set_document: Cannot set document"); } } -void ui_tab_detach_document(UiContext *ctx) { - uic_context_detach_document(ctx->parent); -} /*