Now glfw3.05 has fixed the problem with negative monitor co-ordinates being returned from glfwGetMonitorPos, I can use the this to determine which monitor my window is running on. In my current implementation, I use a f keypress to toggle between windowed and full screen mode, opening the full screen window on the monitor the user is currently running on as determined above.
However, going to full screen seems like it currently requires me to recreate the window and associated resources. I can get around this by simply resizing the window to fit the display that it running on with I am guessing some performance hit. However, when I do this, I can still see the window border/decoration on the adjacent monitor, so this is not a perfect solution. To make things a little better, I would love to see any/all of the following:
- Allow me to remove the border decoration from the window dynamically (possibly using something like setWindowAttribute), or just go full screen without recreating the window (I know this is likely more difficult).
- Give me something which can query the size of the window with the decoration on it (removes my guesses on window border size when computing which monitor the window is on with glfwGetMonitorPos) - maybe this already exists?
- Provide a getCurrentMonitor(glfwWindow*) call to eliminate the code I am currently using glfwGetWindowPos for.
Thanks for glfw, it is a very handy thing.