# Maximize borderless window outside of task bar

**URL:** <https://discourse.glfw.org/t/maximize-borderless-window-outside-of-task-bar/1005>\
**Category:** support\
**Created:** [October 4, 2017, 2:40am UTC](https://discourse.glfw.org/t/maximize-borderless-window-outside-of-task-bar/1005 "2017-10-04T02:40:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keiran1337](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@Keiran1337](https://discourse.glfw.org/u/Keiran1337)\
**Post date:** [October 4, 2017, 2:40am UTC](https://discourse.glfw.org/t/maximize-borderless-window-outside-of-task-bar/1005/1 "2017-10-04T02:40:28Z")

</div>

Hello. I’m working on C++/Windows.

My goal is to remove borders with glfwWindowHint(GLFW\_DECORATED, false) but also maximize the window outside of the area covered by the taskbar, rather than fullscreen.

When I turn decorations on, the default “maximize” button of the window does exactly what I want. It even moves the window when the taskbar moves. But I want to implement that in my own GUI and glfw does not seem to give me a function for that. I can only go completely fullscreen.

How should I do? I thought of a trick like:

1. Leaving decorations on
2. Maximizing the window
3. Measuring the frame
4. Remove decorations and increase the window size to replace them
5. Repeat every time the window is refreshed (i.e, when the task bar is moved)

But that sounds a bit wacky. Or I could make some platform-specific code to find out the correct position and size, but… meh. That’s not what I’m using GLFW for.

---

<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:** [October 4, 2017, 9:04am UTC](https://discourse.glfw.org/t/maximize-borderless-window-outside-of-task-bar/1005/2 "2017-10-04T09:04:42Z")

</div>

This [issue of maximized borderless windows on Windows has been raised before](http://discourse.glfw.org/t/glfwmaximizewindow-bug-on-windows-8-1-and-windows-10-with-undecorated-window/802), and I [created an issue for it on the GLFW Github site](https://github.com/glfw/glfw/issues/899).

It looks like the intended behaviour will be implemented in milestone 3.4, as there is already a large backlog on GLFW.

As a workaround, you could use the windows function [SystemParametersInfo](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724947(v=vs.85).aspx) with the uiAction set to _SPI\_GETWORKAREA_ to get the work area (desktop size excluding task bar).

---

<div class="post-metadata">

**Author:** ![Keiran1337](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@Keiran1337](https://discourse.glfw.org/u/Keiran1337)\
**Post date:** [October 4, 2017, 5:32pm UTC](https://discourse.glfw.org/t/maximize-borderless-window-outside-of-task-bar/1005/3 "2017-10-04T17:32:41Z")

</div>

Thanks for the reply. Looks like I’ll have to wait for 3.4 and use this dirty system-specific code in the mean time.

It’s too bad GLFW doesn’t have this yet because it looks like it’s the last step to allow the developer to make a fully customized window GUI that behaves like a normal window with simple platform-independent code. I don’t think it’s an incompatibility issue, because all systems relevant for GLFW seem to have a taskbar anyway, so it definitely could have been done earlier. But I’m not going to cry, because GLFW is already great.

---

<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 10, 2017, 5:38pm UTC](https://discourse.glfw.org/t/maximize-borderless-window-outside-of-task-bar/1005/4 "2017-10-10T17:38:06Z")

</div>

> [@Keiran1337](#):
>
> It’s too bad GLFW doesn’t have this yet because it looks like it’s the last step to allow the developer to make a fully customized window GUI that behaves like a normal window with simple platform-independent code.

That and proper [dragging](https://github.com/glfw/glfw/issues/923) and [resizing](https://github.com/glfw/glfw/issues/990) of undecorated windows, and possibly a [work area query](https://github.com/glfw/glfw/issues/920) as well.

> [@Keiran1337](#):
>
> I don’t think it’s an incompatibility issue, because all systems relevant for GLFW seem to have a taskbar anyway, so it definitely could have been done earlier.

Yes, definitely. I welcome a patch for the Windows maximization issue that robustly implements @dougbinks’ option #1 and would try to get it into 3.3. Otherwise I’ll try to address it in 3.4.
