# glfwMaximizeWindow bug on Windows 8.1 and Windows 10 with undecorated window

**URL:** <https://discourse.glfw.org/t/glfwmaximizewindow-bug-on-windows-8-1-and-windows-10-with-undecorated-window/802>\
**Category:** support\
**Created:** [November 18, 2016, 5:05pm UTC](https://discourse.glfw.org/t/glfwmaximizewindow-bug-on-windows-8-1-and-windows-10-with-undecorated-window/802 "2016-11-18T17:05:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@Leo](https://discourse.glfw.org/u/Leo)\
**Post date:** [November 18, 2016, 5:05pm UTC](https://discourse.glfw.org/t/glfwmaximizewindow-bug-on-windows-8-1-and-windows-10-with-undecorated-window/802/1 "2016-11-18T17:05:34Z")

</div>

Hello everyone! Thanks for taking the time to read this!

(with the GLFW version found on LWJGL 3.1.0)

Using an undecorated window, glfwMaximizeWindow works perfectly fine on Linux Mint 18, but on Windows 8.1 and 10, the window hides the task/start bar, sizing itself as a full-screen window, but allowing movement and resizing (through a custom frame), meaning it’s not really a proper full-screen either.

The original window size is 1280x720, and the screen resolution of the Windows 8.1 computer is 1900x1600. The resolution of the Windows 10 computer is 1600x900.

---

<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:** [November 19, 2016, 1:57pm UTC](https://discourse.glfw.org/t/glfwmaximizewindow-bug-on-windows-8-1-and-windows-10-with-undecorated-window/802/2 "2016-11-19T13:57:49Z")

</div>

Hi Leo!

[glfwMaximizeWindow](http://www.glfw.org/docs/latest/group__window.html#ga3f541387449d911274324ae7f17ec56b) is an OS function wrapper for maximizing the window, and internally on Windows calls [ShowWindow(window-\>win32.handle, SW\_MAXIMIZE);](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633548(v=vs.85).aspx).

So the behaviour you’re seeing is the Windows OS specific behaviour for a maximized undecorated window, and not a bug.

I agree that this isn’t particularly useful, as being able to make a decorated window as big as possible whilst keeping the OS bar active is pretty useful. The question is whether to change the behaviour of glfwMaximizeWindow or add new functions to enable your desired behaviour - basically either a glfwMaximizeToClientArea or a function to get the client area size (in windows this would probably [use GetMonitorInfo to get the rcWork size](https://msdn.microsoft.com/en-us/library/windows/desktop/dd145065(v=vs.85).aspx).

Any thoughts?

---

<div class="post-metadata">

**Author:** ![Leo](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@Leo](https://discourse.glfw.org/u/Leo)\
**Post date:** [November 19, 2016, 2:37pm UTC](https://discourse.glfw.org/t/glfwmaximizewindow-bug-on-windows-8-1-and-windows-10-with-undecorated-window/802/3 "2016-11-19T14:37:10Z")

</div>

Hi Doug! Thank you for your response!

I find it odd that glfwMaximizeWindow behaves different when undecorated, so I would be inclined to consider changing its behavior to be consistent on both situations: when using undecorated window frames, or the OS frames. But that is just my opinion, and any kind of solution would be welcome.

My particular use case is having a custom frame and title bar for my application, instead of using the OS one. It’s working great so far except for the maximize behavior on Windows. If there’s any other way to achieve a homogeneous behavior across the different OS for the maximize button, I’d be very interested to know about it.

---

<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:** [November 19, 2016, 2:53pm UTC](https://discourse.glfw.org/t/glfwmaximizewindow-bug-on-windows-8-1-and-windows-10-with-undecorated-window/802/4 "2016-11-19T14:53:06Z")

</div>

I think the best way to proceed then would be to [raise this as an issue](https://github.com/glfw/glfw/issues) - perhaps “glfwMaximizeWindow behaviour not consistent across all operating systems for undecorated windows” rather than ‘bug’, and reference this thread.

It would be best if you raised this since you have a need for the behaviour, but I can raise it if needed.

---

<div class="post-metadata">

**Author:** ![Leo](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@Leo](https://discourse.glfw.org/u/Leo)\
**Post date:** [November 19, 2016, 2:58pm UTC](https://discourse.glfw.org/t/glfwmaximizewindow-bug-on-windows-8-1-and-windows-10-with-undecorated-window/802/5 "2016-11-19T14:58:46Z")

</div>

I would appreciate if you could raise the issue since I currently don’t have a GitHub account. I apologize if my wording was incorrect, English is not my native language.

Thank you for your time!

---

<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:** [November 19, 2016, 3:12pm UTC](https://discourse.glfw.org/t/glfwmaximizewindow-bug-on-windows-8-1-and-windows-10-with-undecorated-window/802/6 "2016-11-19T15:12:54Z")

</div>

Your working was fine, I just thought this wording would help clarify things!

I’ve added [the issue to GLFW on github](https://github.com/glfw/glfw/issues/899).

---

<div class="post-metadata">

**Author:** ![elmindreda](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/elmindreda/32/26_2.png) [@elmindreda](https://discourse.glfw.org/u/elmindreda)\
**Post date:** [October 31, 2017, 3:02pm UTC](https://discourse.glfw.org/t/glfwmaximizewindow-bug-on-windows-8-1-and-windows-10-with-undecorated-window/802/7 "2017-10-31T15:02:56Z")

</div>

This has been fixed for 3.3.

> <https://github.com/glfw/glfw/commit/80d181f12dbb3b19fa649638252fa90eacf3d6a2>
