ui/motif/window.c

changeset 101
7b3a3130be44
parent 100
d2bd73d28ff1
--- a/ui/motif/window.c	Thu Dec 12 20:01:43 2024 +0100
+++ b/ui/motif/window.c	Mon Jan 06 22:22:55 2025 +0100
@@ -97,12 +97,25 @@
             toplevel,
             NULL);
     
+    // menu
+    if(!simple) {
+        ui_create_menubar(obj, window);
+    }
+    
     // content frame
     n = 0;
     Widget frame = XmCreateFrame(window, "window_frame", args, n);
     XtManageChild(frame);
     
-    Widget vbox = XtCreateManagedWidget("window_vbox", gridClass, frame, NULL, 0);
+    Widget form = XmCreateForm(frame, "window_form", args, 0);
+    XtManageChild(form);
+    
+    n = 0;
+    XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++;
+    XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
+    XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++;
+    XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++;
+    Widget vbox = XtCreateManagedWidget("window_vbox", gridClass, form, args, n);
     UiContainerX *container = ui_box_container(obj, vbox, UI_BOX_VERTICAL);
     uic_object_push_container(obj, container);
     

mercurial