imakebackground - registers the screen background process
imakebackground registers a process that maintains the screen background.
Call it before winopen. The process should redraw the screen background
each time it receives a REDRAW event.
There is only one background so only one imakebackground process can run
at a time. Any existing imakebackground process is killed when a new one
Because the X Window System's inability to change the mode (called the
visual in xspeak) of a window conflicts with the GL's freedom to change
modes at any time, imakebackground processes cannot paint on the real
background (called the root window in xspeak). Instead a new window is
created with the correct visual. This window is kept at the bottom of the
stack of windows just above the screen background. This imakebackground
window works better when it is what in xspeak is called an override-
redirect window. In simple terms this means the window is not managed by
the window manager.
A window that is managed is likely to be given borders by the window
manager. Currently only 4Dwm(1X) and mwm(1X) understand the request to
turn off the borders. Also the window manager will post the usual window
menu for a managed window. You cannot access the root menu. A managed
window is useful, however, when the imakebackground process is running in
color map mode (see cmode(3G)). The window manager is the only process
that can install the GL color map according to its own color map
management policies so that the window is displayed correctly at the
Because of this dichotomy, there is an X resource that controls whether
or not the imakebackground window is managed. The full resource class is
Name is the name of the window taken from the argument to winopen The
resource can have the values true or false. The default is false. In
other words if the resource isn't specified the imakebackground window is
not managed. We recommend using managed windows for cmode(3g) processes
and non-managed windows for RGBmode(3g) processes. For example the
following entries in the X resource database
cause background windows to be unmanaged except for a background program
called texback which is known to be a cmode(3g) program.
This routine is available only in immediate mode.
PPPPaaaaggggeeee 2222 [ Back ]