pixmap as a background

Bill Thompson (akromld@en.com)
Thu, 2 Jan 1997 08:07:33 +0000

To subscribers of the xforms list from "Bill Thompson" <akromld@en.com> :

Hi,

I'm using xforms ver 0.84 (FL_FIXLEVEL 2) on an SGI Indigo 2 (Irix 5.3)
and am having the following problem:

I have a form which uses a pixmap as a background in the upper two
thirds of the form. On top of the pixmap there are five "fl_add_input"
boxes and one "fl_add_checkbutton". I say "on top" because the
pixmap was defined first ... e.g.:

obj = fl_add_pixmap(FL_NORMAL_PIXMAP,0,0,570,545,"");
fl_set_pixmap_data(obj, background);
fdui->clearance = obj = fl_add_input(FL_FLOAT_INPUT,...
fdui->retract_dist = obj = fl_add_input(FL_FLOAT_INPUT...
etc...

When the form is drawn the first time, the checkbutton and input boxes
are on "top" and the pixmap is "down" as it should be. But, anytime the
form is partially redrawn (i.e.: put a window over top of a part of the
form, then raise the form to back to the top) the pixmap is drawn
overtop of some or all of the input boxes and/or the checkbutton.

If the form is moved causing a complete redraw, all of the objects
are covered up by the pixmap.

To make matters worse, the input is checked and if it is out of range, an
error is displayed using the "fl_show_alert" goodie which when dismissed,
causes the pixmap to be drawn overtop of some of the input objects!

Note that the form is redrawn correctly if the form is iconified and
then restored.

Back in Oct 1996, Dietmar Schnabel wrote about this same problem but
the only responce I can find was to try using fl_redraw_object(button) after
redrawing the pixmap... but how is one supposed to know that the pixmap
is being redrawn?

Is there a better solution?

Thanks,
Bill Thompson <wht@akromold.com>
Systems Analyst Ph (330) 929-3311
Akromold, Inc Fax (330) 920-1338