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?
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 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.
This my repo where I implemented the attrib: GLFW_TITLEBAR, you can only set it after the window is created for now.
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.