Improved performance when switching desktops.

Getting process information is a costly process, this information is now
cached for windows.