Re: XForms: error with FL_PLACE_POSITION

From: Steve Lamont (
Date: Fri Nov 17 2000 - 14:33:22 EST

  • Next message: Trent Piepho: "Re: XForms: error with FL_PLACE_POSITION"

    # To subscribers of the xforms list from Steve Lamont <> :

    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

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

    To unsubscribe, send the message "unsubscribe" to or see
    XForms Home Page:
    List Archive:

    This archive was generated by hypermail 2b29 : Fri Nov 17 2000 - 14:36:52 EST