Taskbar Start Button Centered Origin
Pins the Start button to true screen-center and splits running-app taskbar buttons into two groups flanking it by which side of the screen each window is on (Windows 11 only; incompatible with "Start button always on the left")
Author: rick
Pins the Windows/Start button to the exact horizontal center of the primary
monitor, regardless of how many taskbar icons are present. Running-app
taskbar buttons are split into two groups that flank the Start button:
- A button goes to the left group if its window's current on-screen
position is left of screen-center.
- A button goes to the right group if its window is right of
screen-center.
- Pinned-but-not-running apps have no window to check the position of, so
they're classified by the
leftApps/rightApps name lists below, falling
back to unresolvedAppsDefaultSide if unlisted. Within whichever side
they land on, pinnedAppsAnchor picks whether they sit at the far edge
or right next to Start.
The crosshair-marked window sits left of screen-center - its taskbar icon
follows, landing left of Start.
The same window moved right of screen-center - its icon moves with it,
to the right of Start.
When you drag a window across the center line of the screen, its taskbar
button switches sides to follow it. Side-switching is driven by a periodic
poll of tracked windows' positions and is best-effort: it happens shortly
after a drag/move settles, not on every intermediate pixel of the drag.
Search, Task View and Widgets can either stay at the far left edge, or move
right next to Start on whichever side you prefer.
The window-tracking behind position-based splitting and drag-follow can be
turned off entirely with trackWindowPositions, if you'd rather keep just
the centered Start button and system-button placement with no background
probing of taskbar buttons and no periodic position polling - every app is
then classified the same way as a pinned-but-not-running one instead.
Known limitations (please read before reporting issues)
- Windows 11 only. Windows 10's taskbar has no XAML layer to hook into.
- Primary monitor only, for both the Start button's position and
window-side classification - and on a multi-monitor setup this is a
bigger limitation than it might sound: a window's side is decided by
comparing its position against the primary monitor's center line, so
every window on a monitor entirely to one side of the primary reads as a
fixed left/right regardless of where on that monitor it actually sits -
only movement within the primary monitor (or across its center line) is
tracked per-pixel. Taskbars on secondary displays aren't specially
handled either (their icons keep Windows' default layout) - the mod's
positioning plan is only ever computed on the primary taskbar's own
thread, so secondary-monitor elements are simply never included in it
and fall through to Windows' native positioning.
- Don't enable alongside "Start button always on the left". Both mods
hook the same process-wide
IUIElement::Arrange vtable slot, and both
write their own X position for the Start button - with both enabled,
they simply disagree, and whichever one's hook runs last for a given
Arrange call wins for that pass. This mod's systemButtonsPlacement: far-left setting covers the same "keep everything else out of Start's
way" goal that mod's otherSystemButtonsOnTheLeft option does, so
there's no reason to run both together. This mod is intentionally scoped
to true screen-center plus position-based icon splitting specifically -
not a general Start-position picker - so this conflict is a documented
incompatibility to avoid rather than something planned to be resolved by
merging the two mods or their positioning logic.
- The Start menu itself doesn't follow the repositioned Start button.
This mod only moves the Start button - nothing decides where the Start
menu opens. With the taskbar's own "Taskbar alignment" set to
"Center", the menu happens to open near screen-center anyway since
that's where Windows expects it by default, but with alignment set to
"Left", the button sits at true center while the menu still opens at the
left edge. This is a solvable limitation rather than a permanent one -
taskbar-start-button-position.wh.cpp repositions the menu itself by
hooking StartMenuExperienceHost.exe - just not something this mod
does today.
- A very crowded side compresses instead of overflowing cleanly. If
enough app icons pile up on one side that they'd run into the system
tray/clock on the right (or, in "far left" placement, into Search/Task
View/Widgets on the left), icon spacing on that side is compressed just
enough to keep the whole group within bounds - icons still render at
full size, so once genuinely crowded they visually overlap each other
rather than being hidden or scrolled the way the taskbar's own overflow
handling would.
- Windows' own "Combine taskbar buttons and hide labels: When taskbar
is full" doesn't shrink icons under this mod (icons stay full-size and
compress/overlap instead, per the point above) - "Always" isn't
affected and works normally. Likely because the "when full" decision is
made by native layout logic (this mod only overrides each button's
final X position afterward, it never touches sizing), evaluated against
the taskbar's native, unsplit layout rather than this mod's split one -
unconfirmed, not yet investigated further.
- A grouped button (multiple windows combined under one icon) follows
only its first window. With "Combine taskbar buttons" set to "Always",
a group's side and ordering are both decided by whichever of its windows
happens to be first in the taskbar's own internal list - not necessarily
the one you'd expect - so a group whose windows straddle the center line
won't visually reflect all of them. There's no exposed way to pick a
more meaningful "primary" window for a group, so this is a documented
tradeoff rather than a bug.
- The taskbar's own overflow button, when it appears on a crowded
taskbar, keeps its native position rather than being classified and
placed like the buttons around it - this mod doesn't give it a slot in
the split layout.
- Undocumented internals. This mod hooks private, unversioned classes
inside
taskbar.dll and Taskbar.View.dll (via symbols resolved from
Microsoft's public symbol server at runtime, not hardcoded offsets). A
Windows update can change these internals and break the mod until it's
updated. If that happens, disable the mod rather than filing against
explorer.exe crashing.
- The "resolve which HWND a taskbar button represents" step reuses a
technique from other taskbar-reordering mods (synchronously reporting a
sentinel "click" to the taskbar's internal click handler, which is
intercepted before it does anything, to read back the window handle) -
but unlike those mods, which only ever dispatch it from an actual user
gesture on one specific button, this mod dispatches it unattended, on
its own background timer, against every button it hasn't resolved yet.
It runs on a periodic timer rather than inline during layout, and
Arrange only ever reads whatever the timer has already cached - running
it synchronously from inside the taskbar's own layout pass was the
confirmed cause of an explorer.exe crash (specifically when Windows'
"show taskbar apps on" setting is anything other than "All taskbars",
since that's when a window moving across monitors structurally adds/
removes taskbar buttons rather than just repositioning them). As a
further safeguard, the very first such probe of a session is held back
until a real (non-sentinel) click has been seen passing through the same
interception point, and three misses on a path that has never once
succeeded latch this mod's probing off entirely on that path (see
Wh_Log for which) - so a running app's icon may briefly show on its
default side, rather than by window position, until you click any
taskbar button once. That gate
only covers before interception is ever confirmed working, though: if
a future Windows update breaks interception in a way that still lets a
probe reach the taskbar's real click handler afterward, the probe's
sentinel value gets delivered as that handler's real argument, and the
realistic worst case is a stray window activate/minimize or an access
violation in explorer.exe, not merely icons freezing on their default
side.
- Taskbar buttons can disappear when a display is deactivated (via
Settings, unplugging, or a third-party display on/off tool) - if
"Taskbar behaviors > When using multiple displays, show my taskbar apps
on" isn't set to "All taskbars", Windows itself can drop a window's
taskbar button entirely until you switch to that window (e.g. via
Alt+Tab), rather than migrating it to the remaining taskbar. Reactivating
a display doesn't trigger this. This is native Explorer/taskbar.dll
behavior upstream of anything the mod hooks into, not something this mod
causes or can work around.
Disclosures
I am not a software developer. The present mod was developed using the
Claude Code extension in VS Code. This mod was created for my own
interests and shared for targeted development by members of the Windhawk
community.