[Solved] why is reported screen size smaller than display size with GLFW full screen window

user256552 Asks: why is reported screen size smaller than display size with GLFW full screen window
I’m using GLFW to create a full screen GL application. I’m running it on my Ubuntu 20.04 laptop that has a typical 1920:1080 display, at least that’s the screen resolution reported under Settings->Displays. When I run the following code:

Code:
int monitor_x = 0;
int monitor_y = 0;
int monitor_width = 0;
int monitor_height = 0;

    GLFWmonitor *monitor = glfwGetPrimaryMonitor();
    glfwGetMonitorWorkarea(monitor, &monitor_x, &monitor_y, &monitor_width, &monitor_height);
    printf("before monitor %d, %d, %d, %dn", monitor_x, monitor_y, monitor_width, monitor_height);
    window = glfwCreateWindow(1920, 1080, "OpenGL", glfwGetPrimaryMonitor(), nullptr); // Fullscreen
    glfwGetMonitorWorkarea(monitor, &monitor_x, &monitor_y, &monitor_width, &monitor_height);
    printf("after monitor %d, %d, %d, %dn", monitor_x, monitor_y, monitor_width, monitor_height);

When I run the code, get the following output on stdout:

Code:
before monitor 72, 27, 1848, 1053
after monitor 72, 27, 1848, 1053

Also, it seems as if there’s a horizontal band at the top and a vertical band at the right of the full screen that remains the background color, no matter what my application attempts to write to those areas.

So 72 + 1848 = 1920 and 27 + 1053 = 1080, but it seems that the system is reserving these horizontal and vertical bands for something else that I assume has something to do with that 72 and 27.

Is there some hint or some such thing that i need to specify in order to make the entire 1920 by 1080 of the screen available for rendering?

Thanks

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.