Introduce setWindow and CloseWhenWindowActivated

This is a replacement for CloseOnWidgetActivated that operates on a QWindow instead of QWidget.
1 job for !16 with work/closewindow in 40 seconds (queued for 3 seconds)
latest merge request