Repairing Damage to IDL Graphics Windows

QUESTION: When I cover my IDL graphics window with another window and them remove it, the graphics window is left with a black space in it. How can I repair this graphics window damage?

ANSWER: The technical term for the process whereby windows get repaired is called backing store. Normally IDL asks the X window manager to be in charge of backing store and to repair any windows that get damaged in this way. But window managers don't have to accept the request, although most do.

You can try to ask the window manager more forcefully to maintain the backing store by setting this line in your .Xdefaults file:

   idl.retain 1

But even this is no guarantee. If the window manager absolutely won't accept the request to keep track of backing store, you can ask IDL to keep the backing store for you. If you want the backing store on only important windows, you can set the RETAIN keyword to the WINDOW command equal to 2, like this:

   WINDOW, RETAIN=2

The "2" tells IDL to retain or keep the backing store for that window.

If you want IDL to keep the backing store for all the IDL graphics windows, you can use the DEVICE command like this:

   DEVICE, RETAIN=2

You might want to put this command in your IDL startup file.

You can ask IDL to maintain the backing store on draw widget windows by setting the same RETAIN keyword on the WIDGET_DRAW creation routine, like this:

   drawID = WIDGET_DRAW(tlb, XSIZE=200, YSIXE=200, RETAIN=2)

Google
 
Web Coyote's Guide to IDL Programming