# How to Switch Between Fullscreen and Windowed

**URL:** <https://discourse.glfw.org/t/how-to-switch-between-fullscreen-and-windowed/422>\
**Category:** support\
**Created:** [April 25, 2007, 1:17pm UTC](https://discourse.glfw.org/t/how-to-switch-between-fullscreen-and-windowed/422 "2007-04-25T13:17:48Z")\
**Posts on this page:** 9\
**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:** [April 25, 2007, 1:17pm UTC](https://discourse.glfw.org/t/how-to-switch-between-fullscreen-and-windowed/422/1 "2007-04-25T13:17:48Z")

</div>

**nobody** wrote on [Wednesday, April 25, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/de02e2b9/#feef):

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. 😃

---

<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:** [April 25, 2007, 7:04pm UTC](https://discourse.glfw.org/t/how-to-switch-between-fullscreen-and-windowed/422/2 "2007-04-25T19:04:59Z")

</div>

**[melekor](https://sourceforge.net/u/melekor/)** wrote on [Wednesday, April 25, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/de02e2b9/#b9bd):

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?

---

<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:** [April 25, 2007, 8:33pm UTC](https://discourse.glfw.org/t/how-to-switch-between-fullscreen-and-windowed/422/3 "2007-04-25T20:33:04Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Wednesday, April 25, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/de02e2b9/#98ac):

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.

---

<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:** [April 25, 2007, 8:39pm UTC](https://discourse.glfw.org/t/how-to-switch-between-fullscreen-and-windowed/422/4 "2007-04-25T20:39:40Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Wednesday, April 25, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/de02e2b9/#fa19):

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.

---

<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:** [April 25, 2007, 10:02pm UTC](https://discourse.glfw.org/t/how-to-switch-between-fullscreen-and-windowed/422/5 "2007-04-25T22:02:58Z")

</div>

**nobody** wrote on [Wednesday, April 25, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/de02e2b9/#3f55):

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?)

---

<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:** [April 25, 2007, 11:10pm UTC](https://discourse.glfw.org/t/how-to-switch-between-fullscreen-and-windowed/422/6 "2007-04-25T23:10:27Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Wednesday, April 25, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/de02e2b9/#9647):

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.

---

<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:** [April 25, 2007, 11:11pm UTC](https://discourse.glfw.org/t/how-to-switch-between-fullscreen-and-windowed/422/7 "2007-04-25T23:11:29Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Wednesday, April 25, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/de02e2b9/#3f55/621a):

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.

---

<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:** [April 26, 2007, 3:25am UTC](https://discourse.glfw.org/t/how-to-switch-between-fullscreen-and-windowed/422/8 "2007-04-26T03:25:27Z")

</div>

**nobody** wrote on [Thursday, April 26, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/de02e2b9/#feef/c061):

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

---

<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:** [May 2, 2007, 3:07pm UTC](https://discourse.glfw.org/t/how-to-switch-between-fullscreen-and-windowed/422/9 "2007-05-02T15:07:35Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Wednesday, May 02, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/de02e2b9/#feef/c061/8e7b):

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