CTX_wm_window is then set to NULL and checked in the event queue, but it should be checked for removing handlers too.