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
commit2af916816fb5ca05a0e66762945344371d113c99 (patch)
tree5d7577863e4236664a2f524f56947e8ecf5a04f5 /lwlib/lwlib-Xaw.c
parentdfdcaf49f33bff5d0582fbd7647c48b30d5d6950 (diff)
downloademacs-2af916816fb5ca05a0e66762945344371d113c99.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}
};