Windows + full-screen + D3D -> no window callbacks

fractile wrote on Sunday, April 19, 2015:

Yes, I do know that GLFW is not supposed to be used with Direct3D. Please bear with me.

I’m using Ogre3D graphics engine, which provides both OpenGL and Direct3D9 renderers. I use GLFW for input and for creating the window that Ogre3D renders to. Because some Windows OpenGL drivers simple do not work, I wan’t provide support for the Direct3D9 renderer too. This combination has worked mostly fine.

However, when running the D3D renderer in full-screen mode, alt-tabbing out leaves the mouse cursor trapped in top-left corner of the screen. It moves a little, then jumps back to the corner. No similar problem in windowed mode or with the OpenGL renderer (even in full-screen mode).

While debugging this, I have noticed that GLFW window iconify and focus callbacks are not getting called. I use disabled mouse cursor mode and I suspect that it is somehow not getting properly restored when leaving the full-screen mode window. Probably because of the same reason why those callbacks are not getting called.

If anyone has any ideas on how this could be resolved or hints for debugging this further, please let me know.