Some checks failed
Build and test / build (push) Has been cancelled
This fix moves the actual closing of the window to after all the events are processed.
This fix moves the actual closing of the window to after all the events are processed.