Creating windowed fullscreen


GLFW version: latest from github
Using Cocos2d-X on Windows 10

Hello everyone,

tldr: What is a proper way to create a Windowed Fullscreen (Borderless Fullscreen) window?

So far, I have no problem creating both Fullscreen and Windowed mode windows. It was easy enough and straight forward.

But for Windowed Fullscreen, I’m little confused.

I read the Window guide for more information but wasn’t sure what ‘To create such a window, simply request the current video mode’ what exactly means. No matter what I did with video mode, I ended up creating either Fullscreen on full sized Windowed window with window border.

Also I saw the ‘iconify’ and ‘window’ test codes, but wasn’t able to find any test for Windowed Fullscreen.

So after messing around with code, I ended up creating window as Windowed (monitor == nullptr) then disabled GLFW_DECORATED to make borderless.
The result was fine, worked as I expected, but want to make sure if this is a right way to make one or want to know if I’m missing something.


See the documentation on Windowed full screen windows.

Note that the only difference between a “windowed full screen” and “fullscreen” window here is that the monitors video mode hasn’t changed - just make sure you get the full mode details of the desktop mode and then set that.


Thanks for reply

Now I think I kinda get what video modes are, but I’m still confused with Windowed Fullscreen.

According to “Windowed full screen” guide, it says

const GLFWvidmode* mode = glfwGetVideoMode(monitor);

glfwWindowHint(GLFW_RED_BITS, mode->redBits);
glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);

GLFWwindow* window = glfwCreateWindow(mode->width, mode->height, "My Title", monitor, NULL);

If I create window like this, I get Fullscreen. Window gets minimized when focus is lost. If I disable GLFW_AUTO_ICONIFY, it seems like Windowed Fullscreen but the window always stays on highest level (can’t be overlapped or topped by other windows), which is not what Windowed Fullscreen should be.

I guess it’s obvious because monitor is not NULL, which means it’s “Fullscreen” not “Windowed”, but if I set monitor to NULL, then I get fullscreen-sized decorated window(bordered with title). I have to set GLFW_DECORATED to false in order to make it Windowed Fullscreen like I posted earlier.

So is the guide above wrong or am I? I think I’m overthinking with Windowed Fullscreen, but really want to know thoroughly.


Windowed fullscreen is topmost by design, this is how it should be. The guide is correct. Windowed fullscreen acts as a fullscreen window but without a mode change allowing faster and more stable task switching.

If you want more control over your window, then you need to use a standard window as you’ve found.


I see…now everything make sense now :slight_smile:

Thanks for all the help!