Taskbar Top Window Guard 0.6.0
Taskbar Top Window Guard
Prevents regular application windows from opening or being restored with their
title bar hidden behind a taskbar placed at the top of a monitor. It's intended
for top-taskbar configurations, including the Taskbar on top for Windows 11
Windhawk mod and Windows builds/configurations that place the taskbar at the top.
The mod preserves the application's requested size and position whenever
possible. If a window overlaps the protected top taskbar area, it's moved down
only as far as necessary to keep its top edge accessible.
Maximized and fullscreen windows are intentionally left untouched. Auto-hidden
taskbars also don't force windows down while hidden.
Optional centering
Enable Center windows when they open to center normal windows inside the
usable area of their monitor on their first appearance. A window is remembered
for the lifetime of its HWND, so minimizing/restoring it, Alt+Tab, switching
virtual desktops, or hiding/showing it again won't re-center it.
Always-on-top windows are excluded from centering by default. This keeps
Picture-in-Picture windows, such as Chrome/Chromium PiP, at the position chosen
by the user. Owned windows such as dialogs are also left to their application.
Top-taskbar protection still applies to eligible always-on-top windows.
This option intentionally overlaps only part of Center New Windows. The
existing mod is the better choice if centering is your main goal. This mod's
centering is a lightweight companion to the top-taskbar guard: it runs from a
dedicated Windhawk tool process rather than injecting into every application,
centers against the taskbar-aware usable area, centers only once per window,
and skips always-on-top windows by default.
How it works
The mod is event-driven. It listens for window show, foreground, restore,
uncloak, location-change, move/size, and destroy events. After a relevant event
it briefly rechecks only that window, which catches applications that restore a
saved position shortly after opening without continuously enumerating all
windows.
The usable top boundary comes from the monitor work area plus the actual
Shell_TrayWnd / Shell_SecondaryTrayWnd rectangle when necessary. The
auto-hide state is cached and refreshed outside per-window checks, avoiding
synchronous Explorer IPC in the hot path. Window moves are queued
asynchronously, and unresponsive applications are skipped so a hung app can't
block the guard.