Use signal handlers with the window as the first argument where reasonable to do so