Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
#include <X11/Xmu/XmuSolaris.h>
Bool XSolarisCheckColormapEquivalence\^(
Display *display\f1\^,
int screen\f1\^,
Visual *visual1\f1\^,
Visual *visual2\f1\^);
Colormap Equivalence is a minor relaxation of the X protocol supported by the Xsun (1) X server on Solaris 10 and earlier releases. Two Visuals are Colormap Equivalent if it is possible to use a Colormap created with one of the Visuals as the Colormap of a Window in the other Visual. This is useful on a system that supports Visuals that differ only in their OpenGL (GLX) Attributes.
For example, to avoid colormap flashing, when creating a window with a Visual that is in the same depth as the RootWindow, use the Default Colormap. In standard X, this is only possible if the Visual is the DefaultVisual. With Colormap Equivalence the requirement is relaxed.
To use this function, an application should link with libXmu.
if (!XSolarisCheckColormapEquivalence(dpy, screen, vi->visual, DefaultVisual(dpy, screen)) { attributes.colormap = XCreateColormap(dpy, root, vi->visual, AllocNone); valuemask = CWColormap; } window = XCreateWindow(dpy, root, 0, 0, 500, 500, 0, vi->depth, CopyFromParent, vi->visual, valuemask, &attributes);