Window grab callback

Hullo, I know (by looking at existing posts) that currently GLFW does not support any callback for detecting whether the cursor has grabbed the window or not. I have been using GLFW for about 4 years and it is really my favorite library. But knowing that there is no functionality for detecting a simple click on the window bar makes me sad. I hope that in future versions you implement this callback.

Peace :smile:

The problem is that on some OS’es (Windows) such callback won’t be very useful as grabbing title bar enters modal even loop that does not return until grabbing is finished. In other words - gllfwPollEvents won’t return. So your rendering loop won’t be able to do much with information from callback. There is no easy fix for this on Windows aside some hacky stuff. I have pull request that kind of unblocks this behavior, if this helps you: