CLIM mail archive

[Prev][Next][Index][Thread]

Colormap question (CLX)



Newsgroups: comp.windows.x,comp.lang.clos,comp.lang.lisp
Subject: Help, setting colormap corrupts server (CLIM,CLX)
Summary: 
Expires: 
Sender: 
Followup-To: comp.windows.x
Distribution: world
Organization: CS Dept, University of Texas at Austin
Keywords: CLX colormap

Hi folks -- I'm doing a project in Lucid CLIM/CLX (Common Lisp X system) on
a DEC system under Ultrix.  I am trying to load a colormap for my
display window so that I can use CLX to do a putimage onto the
display.  I am able to create a colormap with all cells allocated
read-write and load the colorcells with the values I wish them to
contain.

My problem arises in loading the colormap for the window:

      (setf (xlib:window-colormap *my-window*) *color-map*)

This is equivalent to doing a call to the XLIB function
XSetWindowColormap.  When I do this, the window manager correctly
installs the colormap when I make my window active.  The problem is
that it also installs this colormap for the root window, and once I
exit my program (which has no clean-up code to speak of.. I do a break
out of the CLIM application frame and just shut down things by
quitting the Lisp environment), the colormap remains installed
whenever I move the mouse pointer into the root window.

All this I could deal with, but from this point forward, about half of
the applications I try to run terminate, reporting a BadMatch error.
In addition, if I try to invoke tvtwm, it reports that it cannot
allocate the colors specified in the .tvtwmrc file.  In this state as
well, Mwm dialogs grab the server but do not respond to mouse clicks.

In any case, I am forced to reboot the server.

I have seen this behavior when running my app under tvtwm and mwm.

I suspect that I need to use the XA_WM_COLORMAP_WINDOWS property to
have the window manager do the right thing cleanly, but the reference
I have is ambigous about this.  I have tried to use the
WM_COLORMAP_WINDOWS property to set the colormap, but this has no
effect.

I am also unsure as to the proper syntax for setting the
XA_WM_COLORMAP_WINDOWS property with CLX.  What should the data field
be?  This is the call I used when I was trying (misguidedly) to use
the WM_COLORMAP_WINDOWS property.

      (xlib:change-property
       *my-window*
       "WM_COLORMAP_WINDOWS"
       '(*color-map*)
       "XA_COLORMAP"
       32 
       :mode :replace)


Help?


0,,


Main Index | Thread Index