issue #20935: Reconnect destruction of widgets to subwiondows so they close properly.