Re: XForms: hide and show form

Dr. T.C. Zhao (zhao@bragg.phys.uwm.edu)
Wed, 13 Aug 1997 00:20:25 -0500

To subscribers of the xforms list from "Dr. T.C. Zhao" <zhao@bragg.phys.uwm.edu> :

from weiner@mcci-arl-va.com (Joel Weiner) :

>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 )

For some window managers, this is necessary in order to compensate for
the reparent stuff. Xforms internally does some of the comensation
and as a result, it works reasonally well under all window managers,
but unfortunately different window managers do different
things, and since there is no ICCCM sanctioned way to
find out what/which window manager is running, it is difficult
to develop a bullet-proof way to handle this. I want
to point out that with some window managers, your method
will cause big time drift.

Basically the problem boils down to this: If I make a request to
place a window at (x,y), most, but not all, window manager may do one of
two things with this, it may place the origin of the window at
(x,y), and the border at x-xBorderWidth, y-yBorderWidth, or it may place
the window origin at (x+xBordwidth, y+yBorderWidth). Xforms
traps reparent event and obtains this piece of information
and compensate for that. However, with transient windows,
the same window manager may do something different
from the full border ones and there is simply no fix for that.
What I might do is to make xforms work correctly with fvwm
and shift the possible error (1 or 2 pixels) to some less popular
window managers.

_________________________________________________
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/