Commit 60bb7819 authored by c.rhodes's avatar c.rhodes
Browse files

colormap / cacheing interaction fixes

Formally, we can't cache colormaps of other clients, or the server; this
means that when we look up a colormap, we will usually be creating one.

That means that we can't rely on the only colormap in town being EQL to
the default colormap, which has its visual-info slot already filled in;
instead, when we lookup a colormap from a window, if its visual-info is
not filled in, set it to the window's visual-info.

[ COLORMAP-VISUAL-INFO is exported from XLIB but not documented in the
  CLX manual.  It might be ripe for non-exporting, particularly given
  that I can't find any internet-accessible code which uses it.  This
  hole was noted from its (unnecessary) use in xrender.lisp ]

darcs-hash:20081008095922-dc3a5-0cf9634db65b42a387dbd4d065080c42b0844299.gz
parent d5f4d53c
......@@ -495,8 +495,13 @@
(declare (clx-values (or null colormap)))
(with-attributes (window :sizes 32)
(let ((id (resource-id-get 28)))
(if (zerop id) nil
(lookup-colormap (window-display window) id)))))
(if (zerop id)
nil
(let ((colormap (lookup-colormap (window-display window) id)))
(unless (colormap-visual-info colormap)
(setf (colormap-visual-info colormap)
(visual-info (window-display window) (resource-id-get 8))))
colormap)))))
(defun set-window-colormap (window colormap)
(change-window-attribute
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment