IT lexicon › Programming › WM_COLORMAP_WINDOWS

WM_COLORMAP_WINDOWS

Programming På svenska → Updated: 2026-10-10

The ICCCM property in which a program lists which of its subwindows carry their own colormaps, so the window manager knows which one to install when the window gets colormap focus.

On an 8-bit screen the graphics card could hold only one colormap at a time, and it was the window manager, not the program, that decided which. ICCCM gave it the rule of installing the colormap of the window with colormap focus, usually the same window that has keyboard or pointer focus. The problem was programs whose top-level window used an ordinary map while an image viewer or a 3D view inside it had its own: the window manager only saw the top level. WM_COLORMAP_WINDOWS, set with XSetWMColormapWindows, is the list of subwindows whose maps should count too; if the top-level window is not in it, it is appended last. The window manager then installs as many of them as the hardware holds, in list order.

The policy for who got focus varied between managers. mwm had a colormapFocusPolicy resource with the modes explicit, pointer and keyboard, and twm had the f.colormap function for cycling through a window's maps by hand. SGI's machines with several hardware colormaps made the property less dramatic, and TrueColor made it irrelevant. It remains in ICCCM and in every window manager's source as a stump from a time when colours were a shared resource.

← Back to the lexicon