# To subscribers of the xforms list from Steve Lamont <spl@ncmir.ucsd.edu> :
This is window manager dependent. To reposition accurately, you need to
determine the position of the parent window (the window manager decoration)
and position accordingly.
This bit of code calculates the "slop" introduced by the window
manager:
Window root;
Window parent;
Window *children;
unsigned int n_children;
int x;
int y;
unsigned int parent_width;
unsigned int parent_height;
unsigned int border_width;
unsigned int depth;
int x_slop;
int y_slop;
XQueryTree( fl_get_display(), form->window,
&root, &parent, &children, &n_children );
XGetGeometry( fl_get_display(), parent,
&root, &x, &y, &parent_width, &parent_height,
&border_width, &depth );
x_slop = ( border_width * 2 ) +
( parent_width - form->w );
y_slop = ( border_width * 2 ) +
( parent_height - form->h );
XFree( children );
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://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Fri Nov 17 2000 - 14:36:52 EST