Run ctx when Window is created
No need to call close