How to Switch Between Fullscreen and Windowed

nobody wrote on Wednesday, April 25, 2007:

I’m using GLFW 2.5 - Is there a way to switch between Fullscreen and Windowed modes?

I was hoping that closing the current window (glfwCloseWindow) and then opening another would work, but it doesn’t. The window closes + opens fine, but nothing will render in it.

If there isn’t a way, any suggestions on how to add this functionality to the library? Cause I really need it. :smiley:

melekor wrote on Wednesday, April 25, 2007:

2.5 doesn’t support this. You’d need to add it in yourself.

On Windows it’s easy:
1) Change the resolution/mode (ChangeDisplaySettings)
2) Resize and move the window (SetWindowPos)
3) Show or hide the window borders, title bar, etc (SetWindowLongPtr)

I’ll probably need this myself at some point, so if it isn’t available by then, I’ll write it.

I’m not so sure about other OSes. Perhaps the ability to switch wasn’t included because most OSes don’t support it?

elmindreda wrote on Wednesday, April 25, 2007:

It should have worked all along, but there are a few bugs in 2.5 that prevents it from working in practice. These have been fixed in 2.6, which is in CVS and which I should have released a beta of a month ago.

elmindreda wrote on Wednesday, April 25, 2007:

You’re talking about switching between fullscreen and windowed mode without destroying the context, which wasn’t the original question. However, there was a thread on that topic on glfw-dev recently.

nobody wrote on Wednesday, April 25, 2007:

Mainly interested in Mac OS X and Windows.

When is the beta of 2.6 due?

If I check out CVS can I easily grab the fixes? (which functions had the bugs?)

elmindreda wrote on Wednesday, April 25, 2007:

I wish I knew. It’s due now, today, a month ago and I don’t know when. I need to find a day or two for GLFW work first.

elmindreda wrote on Wednesday, April 25, 2007:

You can quite easily get 2.6 from CVS. As for where the bugs were, I don’t remember. That was too many bugs ago.

nobody wrote on Thursday, April 26, 2007:

Yeah. 'Cause 2.6 doesn’t even seem to run. :\

elmindreda wrote on Wednesday, May 02, 2007:

Okay. How does it fail? Please submit a bug report to the bug tracker and I’ll look into it.