Pixmap background (was Re: [Fwd: Re: fl_remove_idle_callback ? (where

Robert O'Kane (okane@em.uni-frankfurt.de)
Wed, 20 Nov 1996 00:08:48 +0100

To subscribers of the xforms list from Robert O'Kane <okane@em.uni-frankfurt.de> :

I list this list!! (The answers and help here are really fast !! :-)

This is what I did. ("base" form) please excuse the line-wrapping from
the mailer :-(
semi-pseudo code follows...

FD_bob_form *init_setup_page( void )
{
FD_bob_form *tmp_setup;
Window tmpwin;
Pixmap pmap;

tmp_setup = create_form_bob_form();

tmpwin =
fl_prepare_form_window(tmp_setup->bob_form,FL_PLACE_CENTER,
FL_FULLBORDER,"This is my base form");

/** Find the pixmap from my database of pixmaps **/
if(!get_bob_pixmap("js_background", &pmap, NULL, NULL))
fprintf(stderr,"init_setup_page: Error getting Winbow
background pixmap: js_background\n");
else

XSetWindowBackgroundPixmap(fl_get_display(),tmpwin,pmap);

return tmp_setup;
}

Then do a fl_show_form_window() when I want it.....
Now, in a callback from a button on the "base" form, open a new form
"normally"
but with the pixmap as a(n) background object. (and
fl_deactivate_form("base form"))

FD_sub_window *create_form_sub_window(void)
{
FL_OBJECT *obj;
FD_sub_window *fdui = (FD_sub_window *) fl_calloc(1,
sizeof(FD_sub_window));

fdui->sub_window = fl_bgn_form(FL_NO_BOX, 355, 414);
fdui->sub_background = obj =
fl_add_pixmap(FL_NORMAL_PIXMAP,0,0,355,414,"");
fl_set_pixmap_data(obj, sub_background);

.... (stuff deleted) ...
}

Then later,
fl_show_form(sub_window...) NOTE: This sub-window never goes behind
the base form window.

When the sub_window is clipped, then exposed by ANOTHER window, the
sub-window fails to
redraw properly.

This is on the SGI (5.3 compiled) and also 5.3 code run under 6.3 AND on
Linux Elf
Xforms .81 Beta 1996/06/28 4:23:12 N

Your example seems to be VERY simmilar to mine except for the child form
redraw.
I will (try to) try "all combinations". Unfortunatly I have a netowrk
protocol problem
to solve.

Steve Lamont wrote:
>
> To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
>
> > P.S.: Still trying to get to the pixmap background re-draw problem...
>
> This is a disgusting hack but it seems to work:
>
.....
>
> As I said, it's a gross, disgusting hack and it's not guaranteed to
> work in the future or in all cases but it seems to for me.
>
> spl

Thanks for the help so far!!

Bob.

-- 
----------------------------------------------
Unfortunatly, I find language (like politics) necessary for humans.
Leider finde Ich Sprache (wie Politik) fuer die Menschen notwendig.
----------------------------------------------
Robert O'Kane
OTHERSPACE
Founding Member and Linker

URL : http://www.rz.uni-frankfurt.de/~okane email: okane@em.uni-frankfurt.de ----------------------------------------------

To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuf2.usuhs.mil or see http://bob.usuf2.usuhs.mil/mailserv/xforms.html