summaryrefslogtreecommitdiff
path: root/lwlib/lwlib-Xaw.c
diff options
context:
space:
mode:
authorPaul Reilly <pmr@pajato.com>1994-09-16 17:37:05 +0000
committerPaul Reilly <pmr@pajato.com>1994-09-16 17:37:05 +0000
commit25cad2df1c1d0e8bcfe9fc3f448266d297d431f7 (patch)
treeb2a05457ffc102377a925ac5b9113f0c6301f3bc /lwlib/lwlib-Xaw.c
parent5f66976685e22c338885d3aff6247d56779e206e (diff)
downloademacs-25cad2df1c1d0e8bcfe9fc3f448266d297d431f7.tar.gz
entered into RCS
Diffstat (limited to 'lwlib/lwlib-Xaw.c')
-rw-r--r--lwlib/lwlib-Xaw.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/lwlib/lwlib-Xaw.c b/lwlib/lwlib-Xaw.c
index 19294e7b0bb..9a659bb1a00 100644
--- a/lwlib/lwlib-Xaw.c
+++ b/lwlib/lwlib-Xaw.c
@@ -222,6 +222,8 @@ xaw_pop_instance (instance, up)
{
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 @@ xaw_pop_instance (instance, up)
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 @@ xaw_create_scrollbar (instance)
#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}
};