Re: XForms: Saving and Restoring window positions.

Steve Lamont (spl@szechuan.ucsd.edu)
Thu, 21 Oct 99 06:44:13 PDT

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

> I am new to this list, and about three weeks new to using XFORMS. My
> problem is that I have multiple windows and I need to save the window/forms
> position information into a file and then restore the window/forms into
> the exact same positions on demand. I can save the x,y position
> information, but I have no idea how to set/read the z-order information.
> I would appreciate any help or alternative approaches/suggestions.

Hm. That's a challenging one.

By "z-order information" I presume you mean what is more formally
known in X terms as "stacking order." As far as I can tell, there's
no way to query the stacking order of a collection of Windows.
There's certainly no function XQueryStackingOrder(). :-(

About all I can suggest is to install ConfigureRequest and
ConfigureNotify raw event handlers for all of your XForms Windows and
keep track of the stacking order that way. The `XConfigureEvent' data
structure has an `above' member that may be useful in keeping track of
who is where and the `XConfigureRequestEvent' strucutre member
`detail' will tell you a bit on how the Window is to be stacked.

However, the bookkeeping is likely to be quite messy, particularly if,
as is likely, there are other Windows present.

Not having tried this, I can't say whether it would work -- especially
under different Window Managers.

spl

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