diff lwlib/lwlib-Xaw.c @ 8785:04ad11fb0a0f

entered into RCS
author Paul Reilly <pmr@pajato.com>
date Fri, 16 Sep 1994 17:37:05 +0000
parents 5a3216dd6b70
children b3c30d040767
line wrap: on
line diff
--- a/lwlib/lwlib-Xaw.c	Fri Sep 16 17:37:03 1994 +0000
+++ b/lwlib/lwlib-Xaw.c	Fri Sep 16 17:37:05 1994 +0000
@@ -222,6 +222,8 @@
 	  {
 	    int x, y, w, h;
 	    Widget topmost = instance->parent;
+	    Arg args[2];
+
 	    w = shell->core.width;
 	    h = shell->core.height;
 	    while (topmost->core.parent && XtIsRealized (topmost->core.parent))
@@ -230,7 +232,12 @@
 	    else x = topmost->core.x + ((topmost->core.width - w) / 2);
 	    if (topmost->core.height < h) y = topmost->core.y;
 	    else y = topmost->core.y + ((topmost->core.height - h) / 2);
-	    XtMoveWidget (shell, x, y);
+	    /* Using XtMoveWidget caused the widget to come
+	       out in the wrong place with vtwm.
+	       Question of virtual vs real coords, perhaps.  */
+	    XtSetArg (args[0], XtNx, x);
+	    XtSetArg (args[1], XtNy, y);
+	    XtSetValues (shell, args, 2);
 	  }
 
 	  /* Finally, pop it up. */
@@ -617,9 +624,24 @@
 #endif
 }
 
+static Widget
+xaw_create_main (instance)
+     widget_instance *instance;
+{
+  Arg al[1];
+  int ac;
+
+  /* Create a vertical Paned to hold menubar */
+  ac = 0;
+  XtSetArg (al[ac], XtNborderWidth, 0); ac++;
+  return XtCreateWidget (instance->info->name, panedWidgetClass,
+			 instance->parent, al, ac);
+}
+
 widget_creation_entry
 xaw_creation_table [] =
 {
   {"scrollbar",			xaw_create_scrollbar},
+  {"main",			xaw_create_main},
   {NULL, NULL}
 };