# Window grab callback

**URL:** <https://discourse.glfw.org/t/window-grab-callback/1527>\
**Category:** dev\
**Created:** [April 7, 2020, 10:37pm UTC](https://discourse.glfw.org/t/window-grab-callback/1527 "2020-04-07T22:37:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![EngineFool](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@EngineFool](https://discourse.glfw.org/u/EngineFool)\
**Post date:** [April 7, 2020, 10:37pm UTC](https://discourse.glfw.org/t/window-grab-callback/1527/1 "2020-04-07T22:37:37Z")

</div>

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 😄

---

<div class="post-metadata">

**Author:** ![mmozeiko](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/mmozeiko/32/29_2.png) [@mmozeiko](https://discourse.glfw.org/u/mmozeiko)\
**Post date:** [April 7, 2020, 11:03pm UTC](https://discourse.glfw.org/t/window-grab-callback/1527/2 "2020-04-07T23:03:08Z")

</div>

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: [https://github.com/glfw/glfw/pull/1426](https://github.com/glfw/glfw/pull/1426)
