Removing the top title bar

Hi!

Is there any way I can totally remove/disable the glfw top title bar section? Not like this post, I want the whole title bar portion is gone thus I can make the window int x_min=0, int y_min = 0, int x_max = 3840, int y_max = 2160. I am using code:

glfwWindowHint( GLFW_CONTEXT_VERSION_MAJOR, 3 );
glfwWindowHint( GLFW_CONTEXT_VERSION_MINOR, 3 );
glfwWindowHint( GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE );  // To make Apple happy -- should not be needed
glfwWindowHint( GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE );

window = glfwCreateWindow( width, height, window_title, nullptr, nullptr); // NULL = nullptr // this was previous code line
//window = glfwCreateWindow( width, height, window_title, glfwGetPrimaryMonitor(), nullptr); // NULL = nullptr
if( !window )
    throw Exception( "Failed to create GLFW window" );

glfwMakeContextCurrent( window );
glfwSwapInterval( 0 );  // No vsync

return window;
   
}

You can do this by setting the window hint GLFW_DECORATED to false with:

glfwWindowHint( GLFW_DECORATED, GLFW_FALSE );

before you create the window.

so search indexers can easily find this, as I think this can also be called:
glfw borderless fullscreen
glfw borderless window
https://www.glfw.org/docs/latest/window_guide.html
On that site, you can find the description for the hint and a section called "Windowed full screen" windows which could be useful to you.

1 Like

Thanks @dougbinks @recallmenot !

I did the following (windows 10, x64):

GLFWwindow* full_initGLFW(const char* window_title, int width, int height) {
    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
    glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
    glfwWindowHint(GLFW_DECORATED, GLFW_FALSE); // no effect
    
    GLFWmonitor* primary = glfwGetPrimaryMonitor();
    const GLFWvidmode* mode = glfwGetVideoMode(primary);
    glfwWindowHint(GLFW_VISIBLE,  GLFW_FALSE);

    GLFWwindow* window = glfwCreateWindow(3840, 2160, "title", primary, NULL);
    glfwSetWindowMonitor(window, primary, 0, 0, mode->width, mode->height, GLFW_DONT_CARE /*mode->refreshRate*/);
    glfwMakeContextCurrent(window);

    gladLoadGLLoader((GLADloadproc)glfwGetProcAddress);
    glViewport(0, 0, mode->width, mode->height);
    glfwShowWindow(window);

     return window;
}

It is creating the full screen window. However, I have three monitors. While the full-screen window is on, if I click or try to do anything else on another two monitors, the full-screen window immediately gets minimized. I want the window be there that I can take some screen shot or screen capture. If I use

window = glfwCreateWindow( width, height, window_title, glfwGetPrimaryMonitor(), nullptr);

that is also working, but same problem. If I click on other monitors, the window gets minimized immediately.

Okay, problem solved from @dougbinks old answer: Fullscreen minimizes on clicking on another monitor - support - GLFW