How to detect if a GLMakie window is closed?

When I start my program, I open an GLMakie window. How can I detect if the window is still open or if it was closed by the user? Is there an on_close() event?

I want to stop my simulation when the user closes the window. In the moment the user has to press <ctrl><c> to stop the simulation after closing the window which is not nice…

1 Like

You can try isopen(fig.scene).

1 Like

Thanks, this works!