/* On displays with a mutable colormap, figure out the colors
allocated for the image by looking at the pixels of an XImage for
img->pixmap. */
- if (x_mutable_colormap (FRAME_X_VISUAL (f)))
+ if (x_mutable_colormap (FRAME_X_VISUAL_INFO (f)))
{
XImage *ximg;
{
/* If display has an immutable color map, freeing colors is not
necessary and some servers don't allow it. So don't do it. */
- if (x_mutable_colormap (FRAME_X_VISUAL (f)))
+ if (x_mutable_colormap (FRAME_X_VISUAL_INFO (f)))
{
#ifdef DEBUG_X_COLORS
unregister_colors (pixels, npixels);
/* If display has an immutable color map, freeing colors is not
necessary and some servers don't allow it. So don't do it. */
- if (x_mutable_colormap (dpyinfo->visual))
+ if (x_mutable_colormap (&dpyinfo->visual_info))
{
#ifdef DEBUG_X_COLORS
unregister_colors (pixels, npixels);
if (dpyinfo->n_planes <= 2)
return Qnil;
- switch (dpyinfo->visual->class)
+ switch (dpyinfo->visual_info.class)
{
case StaticColor:
case PseudoColor:
if (dpyinfo->n_planes <= 1)
return Qnil;
- switch (dpyinfo->visual->class)
+ switch (dpyinfo->visual_info.class)
{
case StaticColor:
case PseudoColor:
struct x_display_info *dpyinfo = check_x_display_info (terminal);
Lisp_Object result;
- switch (dpyinfo->visual->class)
+ switch (dpyinfo->visual_info.class)
{
case StaticGray:
result = intern ("static-gray");
necessary and some servers don't allow it. Since we won't free a
color once we've allocated it, we don't need to re-allocate it to
maintain the server's reference count. */
- if (!x_mutable_colormap (FRAME_X_VISUAL (f)))
+ if (!x_mutable_colormap (FRAME_X_VISUAL_INFO (f)))
return pixel;
color.pixel = pixel;
also allows us to make other optimizations relating to server-side
reference counts. */
INLINE bool
-x_mutable_colormap (Visual *visual)
+x_mutable_colormap (XVisualInfo *visual)
{
int class = visual->class;
return (class != StaticColor && class != StaticGray && class != TrueColor);