Re: XForms: hide and show form

Steve Lamont (spl@szechuan.ucsd.edu)
Tue, 12 Aug 97 13:27:35 PDT

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> I had a similar problem, causing my forms to "walk" down and to the
> left. It was somewhat different in that I was swapping two forms,
> trying to get them in the exact same place. It seems that XForms
> was not allowing for or getting the window decoration info from my
> server.

> The fix that worked for me was to get the window attributes of the
> current window using

> XGetWindowAttributes( fl_get_display(), fl_winget(), &win_attribs );
>
> and then calling fl_set_form_position with the following arguments
> ( Pointer to form I want to open,
> X value of current form - win_attribs.x,
> Y value of current form - win_attribs.y )

> What I think happens is that Xforms says "place my window at x,y"
> and the server places the window's decoration at x,y offsetting the
> actual form by the width of the decoration's border (x) and title
> bar (y).

This is essentially correct with a minor correction (quibble): it is
not the X *server* that adds the decoration but the window manager.
They are two quite separate entities. The server is responsible for
handling all the protocol gunk and the window manager is basically in
charge of decoration, layout policy, iconification and
deiconification, and so forth.

It is possible, in fact, to run without a window manager at all,
although this is an extremely rare case, I'm sure. You can't,
however, in any circumstances run without an X server.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/