# glfwSetCallback functions

**URL:** <https://discourse.glfw.org/t/glfwsetcallback-functions/250>\
**Category:** support\
**Created:** [February 3, 2012, 6:08pm UTC](https://discourse.glfw.org/t/glfwsetcallback-functions/250 "2012-02-03T18:08:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [February 3, 2012, 6:08pm UTC](https://discourse.glfw.org/t/glfwsetcallback-functions/250/1 "2012-02-03T18:08:18Z")

</div>

**anonymous** wrote on [Friday, February 03, 2012](https://sourceforge.net/p/glfw/discussion/247562/thread/68f05c06/#8f8b):

I’m using glfw’s callback system to track input. The reference guide says that  
callback functions are only called when glfw is asked to poll events.  
Although, when I register callback function, the register function calls the  
callback, thus breaking the depency needed in program initialization. I cannot  
really fix this problem, since I won’t change the structure of my program. I  
have used a workaround which checks if the callback function is still  
registering.  
I’m hoping this will be fixed or at least there is an option to prevent  
calling a callback function on its registration.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [February 5, 2012, 2:29am UTC](https://discourse.glfw.org/t/glfwsetcallback-functions/250/2 "2012-02-05T02:29:51Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Sunday, February 05, 2012](https://sourceforge.net/p/glfw/discussion/247562/thread/68f05c06/#2420):

You’re right. The glfwSetMousePosCallback and glfwSetMouseWheelCallback lack  
the reference manual note that glfwSetWindowSizeCallback has. I have committed  
a fix that will be included in 2.7.3.

It may be, however, that this behaviour isn’t the right thing to do. I’m  
currently working on GLFW 3, which is an opportunity to re-examine things like  
that.
