Made the window close callback able to stop the window from closing