win: Remove focus listener after window is closed, fixes #364.