# Support for undecorated resizeable window

**URL:** <https://discourse.glfw.org/t/support-for-undecorated-resizeable-window/2344>\
**Category:** support\
**Created:** [March 30, 2023, 1:59am UTC](https://discourse.glfw.org/t/support-for-undecorated-resizeable-window/2344 "2023-03-30T01:59:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [March 30, 2023, 9:26am UTC](https://discourse.glfw.org/t/support-for-undecorated-resizeable-window/2344/2 "2023-03-30T09:26:07Z")

</div>

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](https://github.com/ocornut/imgui/issues/2109).

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:

> <https://github.com/glfw/glfw/pull/1420>
>
> This is a cleaned up version that merges both changes for the drag operation and… resize operation. I implemented the requested changes by @jadahl and @linkmauve and solved conflicts generated by the old pull requests.
> 
> Merged these two pull requests together:
> \- Add support for drag operation on borderless window #987
> \- Support for resize operation on borderless windows #991
> 
> Affected issues:
> \- Provide a way to specify the window drag area on an undecorrated window #923
> \- Support for resizing undecorated window #990
> 
> Current state:
> I tested these changes on windows 10 (win32). I changed the "window" example locally to have an undecorated window and added a buttons to test the drag and resize operations (glfwDragWindow or glfwResizeWindow).
> 
> Specifically for win32 this PR implements the \`WM\_NCHITTEST\` and \`WM\_NCCALCSIZE\` to get rid of the 7px white header above the window. These changes led me to add 2 functions to customize the caption area and the resize border size. Currently this information is available for every platform, but only used for win32. 
> 
> !\[UndecoratedResize\](https://user-images.githubusercontent.com/4852449/192476799-cca65ae3-ed2d-48ef-a56d-b24d306a6661.gif)
> 
> Reviewers: please let me know if this needs to be split up into separate PRs. The drag/resize operations are mostly separate from the win32 specific undecorated window changes. 
> 
> Testing: This PR is only tested in windows 10 at the moment. The other platforms are in the same state as the previous PRs mentioned above, except for the changes I made to get them up to date to the latest master branch.

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](https://github.com/RobbinMarcus/glfw)

---

_[View the full topic](https://discourse.glfw.org/t/support-for-undecorated-resizeable-window/2344)._
