Hello. I’m working on C++/Windows.
My goal is to remove borders with glfwWindowHint(GLFW_DECORATED, false) but also maximize the window outside of the area covered by the taskbar, rather than fullscreen.
When I turn decorations on, the default “maximize” button of the window does exactly what I want. It even moves the window when the taskbar moves. But I want to implement that in my own GUI and glfw does not seem to give me a function for that. I can only go completely fullscreen.
How should I do? I thought of a trick like:
- Leaving decorations on
- Maximizing the window
- Measuring the frame
- Remove decorations and increase the window size to replace them
- Repeat every time the window is refreshed (i.e, when the task bar is moved)
But that sounds a bit wacky. Or I could make some platform-specific code to find out the correct position and size, but… meh. That’s not what I’m using GLFW for.