I’m using glfwWindowHint(GLFW_DECORATED, GL_FALSE); to hide the topbar in my window, but it disables animations in windows 11 like minimizing. Minimizing the window just instantly dissapears the window. When i test with other app’s that have totally custom layout (i.e UE5), then they are minimizing with a smooth animation.
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 since that fires after the event, but it is possible to restore, set decorated and minimize as follows:
Thanks. That helped to get the minimize animation back, but now if i have maximized window, I minimize it and then restore the window, it creates a little titlebar-sized cap at the top. I’m gonna look into some hacky fix for that.
The thread you mentioned was helpful. The solution in there didn’t work but I realized I need to create my own alternative to GLFW with Windows API to get stuff working and wait till the GLFW gets the full borderless window features.
Too bad GLFW doesn’t support making fully functional custom borderless windows yet. Every modern desktop app is doing it (steam, UE5…, blizzard and many other game launchers). But lets hope with the new GLFW version some of the stuff gets added.
I found a perfect GLFW fork repo for my problem. It’s Cherno’s version that uses glfwWindowHint(GLFW_TITLEBAR, GL_FALSE); instead of glfwWindowHint(GLFW_DECORATED, GL_FALSE);. With that you can disable the titlebar and the resizing, animations and snapping are working as needed.