Re: XForms: I've RTFM, still stuck [Was: Re: different visuals...]

From: Steve Lamont (
Date: Wed May 09 2001 - 09:35:05 EDT

  • Next message: Nicolas Castagne: "Re: XForms: fl_winhide // fl_winshow"

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

    > I've RTFM (which I should have done before :), found
    > fl_set_canvas_visual() and fl_set_canvas_depth() routines but this
    > did not help much as it does not seem to work (or, more likely, I do not
    > know how to use it). I've written simple test program with a single form
    > containing EXIT button and a canvas. Then I put following into test_main.c:

    Look at the code in `gl.c', which should be supplied with your XForms
    distribution. See specifically the function glx_init() which fiddles
    with Visuals. I'm not sure the non-active Visuals in `fl_state[]'
    are valid or useful, so you may have to mess with XGetVisualInfo() and
    XMatchVisualInfo() directly in Xlib to fish up the Visual of your

    You'd do something roughly like this

            XVisualInfo vi;

            if ( !XMatchVisualInfo( fl_get_display(),
                                    DefaultScreen( fl_get_display() ),
                                    &vi ) ) {

                /* We lose ... do something to save ourselves */

            fl_set_canvas_visual( canvas, vi.visual );
            fl_set_canvas_depth( canvas, depth );


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

    This archive was generated by hypermail 2b29 : Wed May 09 2001 - 09:41:29 EDT