implemented window swapping. this closes issue Kintaro/wtftw#12