XMLController: avoid closing the window, when viewer is closed