# GLFW\_DECORATED not working on MacOS

**URL:** <https://discourse.glfw.org/t/glfw-decorated-not-working-on-macos/1566>\
**Category:** support\
**Created:** [May 19, 2020, 3:42pm UTC](https://discourse.glfw.org/t/glfw-decorated-not-working-on-macos/1566 "2020-05-19T15:42:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lefty](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@lefty](https://discourse.glfw.org/u/lefty)\
**Post date:** [May 19, 2020, 3:42pm UTC](https://discourse.glfw.org/t/glfw-decorated-not-working-on-macos/1566/1 "2020-05-19T15:42:56Z")

</div>

Setting GLFW\_DECORATED to false doesn’t seem to work on MacOS. The menubar still appears at the top of the application. However, when I run the same code on Windows it correctly removes the title bar. What am I doing wrong?

This is the code:

```
	glfwWindowHint(GLFW_RED_BITS, 8);
	glfwWindowHint(GLFW_GREEN_BITS, 8);
	glfwWindowHint(GLFW_BLUE_BITS, 8);
	glfwWindowHint(GLFW_ALPHA_BITS, 0);
	glfwWindowHint(GLFW_DEPTH_BITS, 32);
	glfwWindowHint(GLFW_STENCIL_BITS, 8);
	glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
    glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
    glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
	if (g_settings.GetSetting(Settings::settingAntiAliasing))
	{
		glfwWindowHint(GLFW_SAMPLES, 4);
	}
	else
	{
		glfwWindowHint(GLFW_SAMPLES, 0);
	}
	if (g_windowMode == modeWindowedFullScreen)
	{
		glfwWindowHint(GLFW_DECORATED, GL_FALSE);
	}
	if (g_sRGB)
	{
		glfwWindowHint(GLFW_SRGB_CAPABLE, GL_TRUE);
	}
	g_pWindow = glfwCreateWindow(g_screenWidth, g_screenHeight, "App", NULL, NULL);

```

thanks for any help you can give me with this

---

<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:** [May 19, 2020, 4:25pm UTC](https://discourse.glfw.org/t/glfw-decorated-not-working-on-macos/1566/2 "2020-05-19T16:25:25Z")

</div>

Welcome to the GLFW forums!

`glfwWindowHint(GLFW_DECORATED, GL_FALSE);` should work on MacOS. Which version of GLFW are you using? I would check removing the if statement to ensure your application is setting the hint to false.

There is a test called [windows.c](https://github.com/glfw/glfw/blob/2551829f75d293d7b4e910b4957798caff01b847/tests/windows.c) which you can build from the glfw source using cmake. Pressing the `D` key when this test is running should switch the four windows from being decorated to non-decorated. If you are able to check that it would help. This uses a different approach, setting the attribute after window creation, but it should work.

---

<div class="post-metadata">

**Author:** ![lefty](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@lefty](https://discourse.glfw.org/u/lefty)\
**Post date:** [May 19, 2020, 7:52pm UTC](https://discourse.glfw.org/t/glfw-decorated-not-working-on-macos/1566/3 "2020-05-19T19:52:42Z")

</div>

that line definitely being called - I checked. The version is 3.3. I will try the test later

---

<div class="post-metadata">

**Author:** ![kasperhbo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/kasperhbo/32/873_2.png) [@kasperhbo](https://discourse.glfw.org/u/kasperhbo)\
**Post date:** [February 15, 2024, 1:57am UTC](https://discourse.glfw.org/t/glfw-decorated-not-working-on-macos/1566/4 "2024-02-15T01:57:57Z")

</div>

This my repo where I implemented the attrib: GLFW\_TITLEBAR, you can only set it after the window is created for now.

> **[GitHub - KaspersTools/glfw: A multi-platform library for OpenGL, OpenGL ES,...](https://github.com/kasperstools/glfw)**
>
> A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input - KaspersTools/glfw

Look at the file:

cocoa\_window.m on line 1290 for the implementation.

Also I have an imgui repo for an example,this also downloads the glfw repo. Here you can see what enabling and disabling flags do. But basically: GLFW\_TITLEBAR makes the titlebar invissible, thats why dragging still works. If you disable the tible bar and the GLFW\_DECORATIONS, your titlebar is gone and the buttons. But you can’t drag anymore.

Im planning on implementing functionallity to manually turning on and of the CLOSE/MINIMIZE/MAXIMIZE buttons.

> **[GitHub - KaspersTools/imgui: Dear ImGui: Bloat-free Graphical User interface...](https://github.com/KaspersTools/imgui)**
>
> Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies - KaspersTools/imgui
