Skip to content

About

Windows tool that makes the taskbar step aside for a borderless window that covers part of it, such as a 16:9 game in the middle of a super-ultrawide monitor.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

taskbar-yield

CI Latest release Licence: MIT

A small Windows tool that makes the taskbar step aside for a borderless window that covers part of it. A 16:9 game in the middle of a 32:9 monitor gets its bottom edge back, and the rest of the desktop stays in view beside it.

Before: the taskbar is drawn over the bottom of a game that fills the middle of a wide monitor. After: the game reaches the bottom edge while it has focus

Windows puts the taskbar behind a window only when that window covers the whole monitor. A borderless window that fills the full height but not the full width is not full-screen to Windows, so the taskbar is drawn over its bottom. taskbar-yield tells Windows to treat such a window as full-screen, and Windows does the rest:

  • while the window has focus, the taskbar is behind it;
  • when focus moves to another window, or you open the Start menu, the taskbar is back.

There is no list of games and no hotkey. The window that has focus decides.

Install

You need Windows 10 or 11. Windows PowerShell 5.1, which the tool runs in, is part of both.

Invoke-WebRequest https://github.com/serionist/taskbar-yield/releases/latest/download/taskbar-yield.ps1 -OutFile taskbar-yield.ps1
powershell -ExecutionPolicy Bypass -File .\taskbar-yield.ps1 install

install does three things, all for your user only and without administrator rights:

  • copies the script to %LOCALAPPDATA%\taskbar-yield;
  • starts it hidden;
  • adds a taskbar-yield value under HKCU\Software\Microsoft\Windows\CurrentVersion\Run, so that it starts at every sign-in.

You can delete the downloaded file afterwards. There is no service and no driver.

NOTE: taskbar-yield was written and tested on Windows 11 (build 26300) with one 7680×2160 monitor. Windows 10 and the taskbars of second monitors are handled in the code but have not been tried. Open an issue with your set-up if it does not work.

Use it

  1. Put the game in borderless mode, at a resolution lower than the monitor's: 3840×2160 on a 7680×2160 monitor, or 2560×1440 on a 5120×1440 one.
  2. Click the game. The taskbar goes behind it.
  3. Click another window or press the Windows key. The taskbar is back.

The guide walks through a whole set-up, with zones for the windows beside the game, and says what to check when a window is not picked up.

The installed copy takes these commands:

Command What it does
taskbar-yield.ps1 status Says whether it runs and whether it starts at sign-in, and shows the last log lines
taskbar-yield.ps1 stop Stops it, and unmarks the windows it marked
taskbar-yield.ps1 start Starts the installed copy hidden
taskbar-yield.ps1 uninstall Stops it, and removes the sign-in entry and the installed copy
taskbar-yield.ps1 Runs in the console you typed it in, and prints what it marks, until Ctrl+C

Run them as & "$env:LOCALAPPDATA\taskbar-yield\taskbar-yield.ps1" status.

Which windows it marks

The focused window is marked when all of these hold:

  • it has no title bar;
  • it covers the taskbar's full thickness, over at least 100 pixels of the taskbar's length;
  • it does not cover the whole monitor, because Windows handles that window already;
  • it is an ordinary application window: not part of the shell, not a tool window, not owned by another window.

A window is looked at when it gets focus, and once a second while it has it, because a game often takes focus first and its final size a moment later. Windows can drop a mark, as it did for a game that was still loading, so the tool also checks once a second that the taskbar is behind the marked window, and marks the window again if it is not. A marked window is unmarked when it moves off the taskbar, is minimised, or when the tool stops.

Settings

Two settings, given to install. Install again to change them.

Setting What it does
-Exclude Name1,Name2 Never marks windows of these processes. Names are without .exe.
-IncludeCaptioned Also marks windows that have a title bar.
powershell -ExecutionPolicy Bypass -File .\taskbar-yield.ps1 install -Exclude Discord,Spotify

What it does to other programs

taskbar-yield never moves, resizes or restyles a window, and it does not read another process's memory, inject into it or send it input. It does two things:

  • it reads the focused window's rectangle, style and class name, and the taskbar's rectangle;
  • it calls ITaskbarList2::MarkFullscreenWindow with the window's handle. This is the documented shell call an application uses to say that its own window is full-screen.

Windows keeps the mark on its own side. On Windows 11 build 26300 the call left no property on a marked window. With -Exclude, the tool also reads the process name behind the focused window.

It has run beside League of Legends with Riot Vanguard active, for one evening on one machine. That is not an assurance. Anti-cheat vendors do not publish what they accept, so decide for yourself, and use -Exclude to keep the tool away from a game. How it works has the details.

What it costs

One hidden Windows PowerShell process. Its working set measured 85 to 101 MB. It waits for focus changes and wakes once a second to look at the focused window again.

Limits

  • The taskbar goes behind on the whole monitor, not only under the window. While the marked window has focus there is no taskbar beside it either. This is how Windows treats every full-screen window.
  • Windows treats the window as full-screen in other ways too. While it has focus, Windows reports a full-screen application (SHQueryUserNotificationState returns QUNS_BUSY), so a rule that depends on one, such as do not disturb, can apply.
  • A window with a title bar is left alone unless you install with -IncludeCaptioned.
  • A killed instance leaves its marks. If the process is ended rather than stopped, the windows it marked stay marked until they close. stop and uninstall unmark them.
  • Not tried: windows of programs that run as administrator, Windows 10, more than one taskbar.

Uninstall

& "$env:LOCALAPPDATA\taskbar-yield\taskbar-yield.ps1" uninstall

This stops the tool, removes the sign-in entry and deletes %LOCALAPPDATA%\taskbar-yield.

Developing

The whole tool is taskbar-yield.ps1: a PowerShell front end for the commands, and a C# part it compiles when it starts, which holds the rule and the Win32 calls. CONTRIBUTING.md says how to run the linter and the tests.

Licence

MIT.

About

Windows tool that makes the taskbar step aside for a borderless window that covers part of it, such as a 16:9 game in the middle of a super-ultrawide monitor.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages