player: exit if main window closed