Generate/preload windows in thread