I’m using GLUT to create my window, and would like to toggle between fullscreen and windowed. I use glutFullScreen() to go into fullscreen mode, and glutReshapeWindow() to return to windowed mode. I track the current window size in the reshape callback (glutReshapeFunc), and use the stored value to restore my window back to its original size. I would like the window to also be at its original location.
I note that there are a few GLUT calls related to window position, namely glutPositionWindow and glutInitWindowPosition. Problem is, I have no idea where the window was before it was made fullscreen. Is there some way to determine where the used has placed the window?