Set the colormap focus policy to ftype. ftype can either be 'mouse, indicating that the window under the mouse pointer should always have its colormap installed, or 'focus to indicate that the window with the input focus should also get the colormap focus. This makes a difference only when using focus policies other than 'mouse.