fixed Window Tiling function