cozman wrote on Sunday, June 13, 2004:
I have my application’s internal timer pause when the app loses focus, but if the title bar is held down or the app is dragged, no focus loss is recorded, which is probably correct behavior since the application doesn’t lose focus. Would it be possible to get a glfwGetWindowParam(GLFW_PAUSED) or similar, or is there another way for me to detect when the title bar has been grabbed.
The problem is that execution is stalled, so if my timer continues to run, when focus returns all objects using time based movement will jump forward all at once, causing major headaches. The pausing on drag can be seen in the following demo (assume normal initialization).
int i=0;
while(1)
{
glfwPollEvents();
std::cout << ++i << std::endl;
}
(btw if it matters this is being done on Windows w/ glfw 2.4.2)