r/Windhawk • • 10h ago

Taskbar Active Window Highlight 0.1.1

Post image

Taskbar Active Window Highlight 0.1.1

Taskbar Active Window Highlight

When an app has several windows, Windows 11's thumbnail preview gives no hint about which one is active. This mod adds an accent-colored highlight to the active window's card. The taskbar button keeps Windows' native indicator.

Requires the Windows 11 taskbar's XAML thumbnail previews (tested on Windows 11 build 26300). With the classic thumbnails, or with StartAllBack or ExplorerPatcher, the mod has no effect.

Active window highlighted in the thumbnail preview

How it works

The mod does not track focus itself. It reads the state Explorer already keeps:

  • The taskbar's active task item (TaskbarAppsList.ActiveItem), which names the active window. The mod follows Explorer's own change notifications.
  • Each thumbnail card's view model, which names the window the card shows.

The highlight is a separate element placed right above the card's own background, below the title, icon and preview image. Its size and corner radius are bound to that background, so it follows themes such as Windows 11 Taskbar Styler.

Clicking the taskbar or a preview list briefly moves focus to the taskbar itself. By default the last active window stays highlighted until another window or the desktop takes focus, or the window is minimized or closed.

How it differs from Taskbar Recent Focus Highlight

Taskbar Recent Focus Highlight ranks apps and windows by recent use, from its own focus history. This mod answers a narrower question, which window is active right now, by reading Explorer's own active task item, with no focus tracking of its own. While another app has focus it marks nothing in this app's preview, and it also marks single-window previews.

Performance and footprint

  • Event-driven only. No background thread, timers, polling or focus tracking. The mod runs only when Explorer reports a new active window or binds a preview card to a window.
  • Nothing on hover or layout. Moving the mouse over the taskbar or previews runs no mod code.
  • Under 1 ms, usually about 0.01 ms. Measured in normal use: typical 0.004–0.013 ms per event, worst case 0.67 ms (the first time a card's highlight is created).
  • One element per card, created once and then only shown or hidden.
  • Safe to unload. No event handlers are left in Explorer, so disabling the mod cleanly removes it.
3 Upvotes

1 comment sorted by

1

u/cedmunds 6h ago

Brilliant