Closed anentropic closed 1 year ago
I don't know the answer to your question, but I recommend you ask it over at https://discuss.ocaml.org, where it is more likely to receive an answer.
Looks like the X11 implementation of Graphics doesn't handle "close window" events, unlike the Win32 implementation. This should not be hard to handle. See e.g. https://www.lemoda.net/c/xlib-wmclose/
I'm on macos
I opened a window from ocaml shell, the XQuartz window opens. If I then close the window from the 'x' button on the window controls I get this error and the ocaml shell crashes:
(closing from code
Graphics.close_graph ();;
works fine)Is there a way to handle the close button so it doesn't cause an error?