Haskell: OpenGL, how to prevent window from closing immediately

When I close the OpenGL window, it creates a console ghcifrom which the application was launched immediately. Is there a way to prevent this behavior? Sample application .

Thank.

+3
source share
1 answer

before calling mainLoop you can change the mode of actionOnWindowClose:

actionOnWindowClose $= MainLoopReturns

mainLoop

I don't know if this works for non-Linux users.

+2
source

Source: https://habr.com/ru/post/1746663/


All Articles