# Windows 11 animations not working when GLFW\_DECORATED is false

**URL:** <https://discourse.glfw.org/t/windows-11-animations-not-working-when-glfw-decorated-is-false/2456>\
**Category:** support\
**Created:** [September 19, 2023, 3:08pm UTC](https://discourse.glfw.org/t/windows-11-animations-not-working-when-glfw-decorated-is-false/2456 "2023-09-19T15:08:04Z")\
**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:** [September 20, 2023, 11:11am UTC](https://discourse.glfw.org/t/windows-11-animations-not-working-when-glfw-decorated-is-false/2456/2 "2023-09-20T11:11:54Z")

</div>

As far as I can tell, windows doesn’t apply minimize/maximize animation to borderless windows, but from searching I found that there is a workaround which might work: when the your minimize button is clicked or event received you can set the window style back to having a border then minimize then restore it back to borderless when it is fully maximized.

However this doesn’t work if done via the [iconify callback](https://www.glfw.org/docs/3.3/group__window.html#gac793e9efd255567b5fb8b445052cfd3e) since that fires after the event, but it is possible to restore, set decorated and minimize as follows:

```auto
void IconifyCallback( GLFWwindow* window, int iconified )
{
    static bool inside = false;

    if( inside ) { return; }
    inside = true;
    if( iconified )
    {
        glfwRestoreWindow( window );
        glfwSetWindowAttrib( window, GLFW_DECORATED, GLFW_TRUE );
        glfwIconifyWindow( window );
    }
    else
    {
        glfwSetWindowAttrib( window, GLFW_DECORATED, GLFW_FALSE );
    }
    inside = false;
}

    // somewhere after in your window creation code:
    glfwSetWindowIconifyCallback( window, IconifyCallback );

```

Obviously if you’re minimizing via your own button you can do better and simply decorate then minimize. This will still show a border when animating though.

Finally you could animate the window yourself. This might not be a good idea for people who have turned animations off, but perhaps there is a way to read that setting and change your behaviour.

EDIT: you might also want to take a look at:

> [@Making a custom titlebar](https://discourse.glfw.org/t/making-a-custom-titlebar/2392):
>
> I want to disable the current titlebar and draw my own with opengl. I decided to use GLFW\_DECORATED → GLFW\_FALSE, but this disable everything. So I had the idea of making the window transparent and draw the screen, reimplement dragging and resizing and all that basic stuff. My question is, is it even possible to do all the above and if yes, can I still snap the window on my screen in windows 10-11? Is there a better option to make a custom titlebar?

---

_[View the full topic](https://discourse.glfw.org/t/windows-11-animations-not-working-when-glfw-decorated-is-false/2456)._
