# Clarification of borderless fullscreen and borderless windowed modes?

**URL:** <https://discourse.glfw.org/t/clarification-of-borderless-fullscreen-and-borderless-windowed-modes/1235>\
**Category:** support\
**Created:** [December 20, 2018, 11:53pm UTC](https://discourse.glfw.org/t/clarification-of-borderless-fullscreen-and-borderless-windowed-modes/1235 "2018-12-20T23:53:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimmyR](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@TimmyR](https://discourse.glfw.org/u/TimmyR)\
**Post date:** [December 20, 2018, 11:53pm UTC](https://discourse.glfw.org/t/clarification-of-borderless-fullscreen-and-borderless-windowed-modes/1235/1 "2018-12-20T23:53:31Z")

</div>

As far as I understand, there are 4 main modes in GLFW:

1. Windowed mode (monitor = nullptr)
2. Fullscreen mode (monitor != nullptr)
3. Windowed borderless (monitor = nullptr, decorated = false)
4. Fullscreen borderless (monitor != nullptr, video mode = monitor mode)

You can then specify the auto iconify hint to determine whether the fullscreen borderless will minimize when focus is lost.

What is the difference between #3 and #4? For example, if I create a borderless, maximized, and undecorated, window compared to creating a fullscreen borderless window with the same monitor mode?

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

    etc...

    window = glfwCreateWindow(video_mode->width, video_mode->height, "example", monitor, nullptr);

```

Versus

```
    glfwWindowHint(GLFW_DECORATED, GLFW_FALSE);

    etc...

    window = glfwCreateWindow(video_mode->width, video_mode->height, "example", nullptr, nullptr);

```

Are they treated the same by Windows 8/10 and/or does one go through the compositor and the other does not?

Thanks much for the clarification.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [December 21, 2018, 11:29am UTC](https://discourse.glfw.org/t/clarification-of-borderless-fullscreen-and-borderless-windowed-modes/1235/2 "2018-12-21T11:29:31Z")

</div>

There are two main differences at the moment with your #3 and #4 on Windows (I’m not sure about other platforms, but your question was Win 8/10 related).

1. The fullscreen window is topmost, which you can replicate with [a floating window](https://www.glfw.org/docs/latest/window_guide.html#window_attribs_wnd).
2. SwapBuffers does not use [DwmFlush](https://github.com/glfw/glfw/blob/2de2589f910b1a85905f425be4d32f33cec092df/src/wgl_context.c#L270).

Topmost windows the exact size/position of the monitor have some special behaviour under windows, but I can’t find decent documentation on this nor if they completely avoid the DWM compositor.

There are some related issues on borderless windows you might want to follow:

> <https://github.com/glfw/glfw/issues/1267>

  
and  

> <https://github.com/glfw/glfw/issues/1144>

---

<div class="post-metadata">

**Author:** ![elmindreda](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/elmindreda/32/26_2.png) [@elmindreda](https://discourse.glfw.org/u/elmindreda)\
**Post date:** [January 15, 2019, 11:59am UTC](https://discourse.glfw.org/t/clarification-of-borderless-fullscreen-and-borderless-windowed-modes/1235/3 "2019-01-15T11:59:11Z")

</div>

> [@TimmyR](#):
>
> What is the difference between #3 and #4?

Windows has been covered very well by @dougbinks.

On X11, where there is a high-level “full screen window” concept, GLFW will tell the window manager to treat a mode 4 window as full screen for the chosen monitor. From that point the window manager takes care of things like placement, z-order, compositor bypassing and possibly other things. GLFW also supports the separate mechanism specifically for asking a window manager to bypass compositing and will apply it to mode 4 windows but not mode 3 ones.

On macOS we don’t yet but will support optionally giving mode 4 windows their own Spaces, which is another (weirder) kind of high-level full screen window concept.

> [@TimmyR](#):
>
> Are they treated the same by Windows 8/10 and/or does one go through the compositor and the other does not?

A mode 3 window (if you also make it topmost but leave out maximization) and a mode 4 window will likely be treated the same wrt compositing on Windows. OpenGL compositor bypassing on Windows is controlled by the GPU driver, which as far as I can tell will ignore the hints available for this and instead decide ad-hoc based on the placement and style flags of the window. These will look pretty similar for modes 3 and 4 since Windows doesn’t have a real full screen concept.
