After I close a program, part of the window remains open. The affected part of the screen remains as it was when the window was open, and it stays on top of other windows. It's not a redraw issue per se --
xrefresh doesn't help since it repaints the bad window.
This phantom window does not appear in the 'task bar' or Alt+Tab switcher, but it's not just a screen artifact either. When I run my mouse over it the cursor changes, so it's still being treated in some ways like a window (though it can't be selected or changed and it doesn't have a full titlebar).
Any ideas how I can change this? This problem happens, unfortunately, with some regularity to me, maybe every other week. As I leave my computer on for extended periods to do extended calculations this is more than a small inconvenience, since it blocks part of the display for several weeks until the work is complete and I can restart.