#174 Win7, GLUT_ACTION_ON_WINDOW_CLOSE breaks on multiple windows

closed-works-for-me
nobody
None
5
2012-08-05
2012-05-17
mchen
No

Calling glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, ...) with either continue or mainloop_returns doesn't appear to work if you have multiple windows.

I create two windows and set the option, but clicking the 'x' on my first created window will always close the app without returning from glutMainLoop (where the desired behavior is to either return from loop or or let the other window continue running). The second window I create will behave as specced when I click 'x'.

Discussion

  • Thanks for the report. I cannot reproduce this. I just tried with the Callbackmaker demo, adding either of glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE,GLUT_ACTION_CONTINUE_EXECUTION) or glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE,GLUT_ACTION_GLUTMAINLOOP_RETURNS) works fine with in the first case the other window staying open no matter whether i close the first or the second, and with in the second the mainloop returning when either window is closed.

    As this action is a global and not window specific, I'm suprised you've seen this before. Can you still observe this in your applications?

     
  • mchen
    mchen
    2012-07-24

    I haven't worked with freeglut in a few months. I left the project behaving as described above.

    One thing that came up in another bug that I reported, I am using the MSVC package from http://www.transmissionzero.co.uk/software/freeglut-devel/. So it might be specific to the package or the snapshot they took when they built it.

     
    • status: open --> closed-works-for-me