Re: XForms: colormaps and canvases

Stephen Langer (langer@cam.nist.gov)
Wed, 22 Oct 1997 13:53:38 -0400

To subscribers of the xforms list from "Stephen Langer" <langer@cam.nist.gov> :

I asked:
> > Is it possible to install a colormap in more than one canvas?

spl replied:
> It's probably better to either use the Default map or to just copy one
> colormap to the other than trying to use two.
>

I can't use the default map since I need to know that I can fill
the colormap with lots of colors. (I don't mind if there's a bit
of flashing when the window focus changes.) The colormap that I use
isn't static -- I have to be able to change entries in it -- so
it would be nice to have only ONE map so that I don't have to make
the changes twice. But when I install one map in two canvases, the
program crashes when the form is freed.

It looks to me as if XForms is calling XFreeColormap() for colormaps
assigned to canvases with fl_set_canvas_colormap(). Is that what's going
on? I would think that if I hand a canvas a colormap, then it should be my
responsibility to free it, and XForms should leave it alone.

How do I copy one colormap to the other? My manuals have
XCopyColormapAndFree(), but no XCopyColormap().

-- Steve

-- 
-- EMail: stephen.langer@nist.gov                    Phone: (301) 975-5423 --
-- WWW:  http://math.nist.gov/mcsd/Staff/SLanger/    Fax:   (301) 990-4127 --
-- Mail: Building 820 Room 365; NIST; Gaithersburg, Md          20899-0001 --
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/