Support for undecorated resizeable window

I’m implementing a UI library, but i want to draw my title bar, i find glfw don’t support undecorated resizeable window, if i use undecorated window, i could not resize my window.

i find this question in past 5 years ago, Support for resizing undecorated window · Issue #990 · glfw/glfw · GitHub
but this pr don’t merge to master branch.

You can resize and move an undecorated window using glfwGetWindowSize and glfwSetWindowPos. These can be used alongside your own UI to provide drag and resizing. For an example of this see the Dear ImGui Docking branch with viewports.

One problem with this is that you no longer receive OS resizing events such as the Windows WIN+LEFT for tiling the window on a part of the screen.

I am not sure of the status of the linked issue, but it appears the fork mentioned no longer exists. A newer version appears to be in progress here:

There still appear to be some issues so I do not expect this to be merged soon, but you can try the linked branch from the pull request yourself: GitHub - RobbinMarcus/glfw: A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input

1 Like

thanks your reply. i find imgui don’t use platform resize event, it simulates a resize event when cursor hover over in the border.

Yes, this is what I stated in my response - you can use glfwGetWindowSize and glfwSetWindowPos along with your own UI code to resize and position the window.

1 Like