[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 Programmer's Guide


The colormap used by a widget is the value of the Core resource XmNcolormap. An application that does not supply its own colormap does not need to set this resource. The default for a top-level shell is the default colormap of the screen. For other widgets, the default is copied from the parent.

An application that uses its own colormap should not use XtAppInitialize to create the top-level shell, because the shell would then use the screen's default colormap. Instead, the application should open the display, create the colormap, and then call XtAppCreateShell with the colormap as the XmNcolormap argument.

If an application uses different colormaps for some windows in its hierarchy, it must tell the window manager about those colormaps by setting a WM_COLORMAP_WINDOWS property on the top-level window. See Chapter 18 for more information.

For more information about colormaps, see Xlib--C Language X Interface.

[ Previous | Next | Contents | Glossary | Home | Search ]