From 2af916816fb5ca05a0e66762945344371d113c99 Mon Sep 17 00:00:00 2001 From: Paul Reilly Date: Fri, 16 Sep 1994 17:37:05 +0000 Subject: entered into RCS --- lwlib/lwlib-Xaw.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'lwlib/lwlib-Xaw.c') 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} }; -- cgit v1.2.1