update window status refctoring.