Readd window states to applications