add focused window to state