XBMC will now be activated directly after the foremost window is closed, just in case other windows have popped up in the meanwhile.