OnClose() automatically calls EndApp()

Monkey Forums/Monkey Bug Reports/OnClose() automatically calls EndApp()

PixelPaladin(Posted 2016) [#1]
The following source code calls OnClose() when the escape key is pressed. Since OnClose() has been overloaded and does not call EndApp() the application should not terminate. However – if the close window button has been clicked the new OnClose() method gets called but the window also gets closed. When using the escape button the application window stays open like it should.
The problem occurs on Linux (Ubuntu 14.04 LTS) using the Glfw3 target. I have not tested it on Windows yet but I am sure that this has worked properly on Linux in an earlier version of mojo.




ImmutableOctet(SKNG)(Posted 2016) [#2]
I'm having the same issue on Windows 10. Sounds like a Monkey GLFW bug to me.

EDIT 01: Apparently, this happens because Mark's not using 'glfwSetWindowShouldClose' in the 'OnWindowClose' callback. Seems like a very easy fix.
EDIT 02: I made a pull-request, that should at the very least patch this. (GLFW3 / GLFW3+ANGLE)


PixelPaladin(Posted 2016) [#3]
Thanks! That was fast.