change the deactived listener to closing listener of the DetailWindow