positioning a form

J. P. Mellor (jpmellor@ai.mit.edu)
Thu, 2 Jan 1997 11:29:40 -0500

To subscribers of the xforms list from "J. P. Mellor" <jpmellor@ai.mit.edu> :

I'm using version 0.84 on linux and I've encountered some peculiar
behavior in positioning forms. It seems that when using
FL_PLACE_GEOMETRY the first form is positioned so that the upper
left-hand corner of the entire window (including all decorations) is
at the desired position. The second form is positioned differently
(the decorations seem to be ignored) even though the requested
position is exactly the same. The thing that caught my attention was
that the positioning was different. Below is a program that
demonstrates this behavior. The two forms should be the same size and
placed at the same position.

Is this a window manager problem or an xforms one?

Thanks,

jp

========================================================================
#include <forms.h>
#include <stdlib.h>

typedef struct {
FL_FORM *form;
void *vdata;
long ldata;
} FD_form;

int
main(int argc, char **argv)
{
FL_OBJECT *obj;
FD_form form1, form2;

fl_initialize(&argc, argv, 0, 0, 0);
form1.form = fl_bgn_form(FL_UP_BOX, 200, 200);
fl_end_form();
fl_set_form_geometry(form1.form, 100, 100, 200, 200);
fl_show_form(form1.form, FL_PLACE_GEOMETRY, FL_FULLBORDER, "Form 1");

form2.form = fl_bgn_form(FL_UP_BOX, 200, 200);
fl_end_form();
fl_set_form_geometry(form2.form, 100, 100, 200, 200);
fl_show_form(form2.form, FL_PLACE_GEOMETRY, FL_FULLBORDER, "Form 2");

obj = fl_do_forms();
return 0;
}