Skip to content

Taskbar previews and Alt+Tab fixes: hidden tabs, minimized groups, ghost UWP windows, sharp icons - #55

Merged
leafOfTree merged 8 commits into
masterfrom
taskbar-preview-cache
Oct 10, 2026
Merged

leafOfTree merged 8 commits into
masterfrom
taskbar-preview-cache

Conversation

@leafOfTree

@leafOfTree leafOfTree commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Taskbar previews

  • Black thumbnails for hidden tabs. Chromium and Electron windows (Obsidian, Brave, …) stop painting while another window covers them, so a hidden tab printed black. Each tab's last good capture now stands in for it, and minimized tabs show it too instead of a grey placeholder.
    • Captures are kept at most 800 px on the longer side.
    • A tab is captured half a second after it comes to the front.
    • A hidden tab that printed blank is not printed again until it has been in front.
  • Previews that failed outright for some groups:
    • A hidden tab strip drew as a 0×0 bitmap, so none of the group's previews worked. The preview now covers the window alone.
    • A group whose windows hadn't been on screen since WindowTabs started had an empty preview area. It now uses the window's own bounds.
    • A minimized window sits at −32000,−32000, so its image was drawn off the thumbnail, leaving it black (Explorer here). It is now drawn where the group's windows are restored to.
  • Group taskbar icon kept at most 64 px. A 256 px app icon (Neovide) made a badged icon that the Windows Alt+Tab drew across the group's whole tile.

WindowTabs Alt+Tab switcher

  • Ghost UWP windows such as Realtek Audio Console are no longer listed. The switcher builds its list inside a low-level keyboard hook. There, the virtual-desktop check fails with RPC_E_CANTCALLOUT_ININPUTSYNCCALL, and a failed check counted as "shown". Inside the hook, the window's last known answer is now used and refreshed on a pool thread, so the hook never waits.
  • A UWP frame on the current desktop that is neither minimized nor holding its app counts as hidden. Minimized UWP apps stay listed.
  • Sharp list icons. The list switcher fetches each program's icon at the size it is drawn (40 px at 125%) instead of upscaling a 32 px copy.

Docs

  • docs/taskbar-preview-width.md records what was tried to fit taskbar previews to tall windows and what remains to try. A brief "push thumbnails early" attempt is included in this branch's history and reverted.

Tests

  • tests/Run-Tests.ps1: all suites pass locally.
  • New checks:
    • TaskbarPreview: stand-in captures, and the 64 px cap on the group icon.
    • GroupLifecycle: a group never on screen still has a preview area.
    • Reliability: a cloaked window checked inside a cross-thread SendMessage (an input-synchronous call). It fails without the fix.
  • On a real Windows 11 desktop:
    • the Realtek ghost and other empty UWP frames are excluded, while Settings, Store and a minimized Calculator stay;
    • Explorer previews work;
    • the list switcher's icons are sharp.

Chromium and Electron windows stop painting while another window covers them,
so a hidden tab printed black in its taskbar preview, and a minimized one
showed only a grey placeholder. Each tab's last good capture, kept at most 800
pixels on its longer side, now stands in for it. A tab is captured half a
second after it comes to the front, and a hidden tab that printed blank is not
printed again until it has been in front.
The taskbar lays out a preview from the thumbnails it holds, else at the
largest size it would accept, too wide for a half-screen window, and it drops
them when a preview closes. Each tab's thumbnail, fitted to that size, is now
handed over before the next preview: soon after tabs or their size change, and
a second after the taskbar last asked for one.

A group's previews also failed outright while its tab strip was hidden, or
when its windows had not been on screen since WindowTabs started; the preview
now covers the window alone, and the window's own bounds stand in for the
placement not yet saved.
@leafOfTree leafOfTree changed the title Show hidden tabs in taskbar previews as they last looked in front Taskbar previews: fit tall windows, show hidden tabs, fix failing previews Oct 10, 2026
…nails early

Handing each tab's fitted thumbnail to the taskbar before it asked did not
keep tall windows' previews narrow, so the taskbar asks for thumbnails again
as before. A minimized window's image is now drawn where the group's windows
are restored to, not far off screen, which left the thumbnail empty.
A UWP app closed to the background, such as Realtek Audio Console, can leave a
frame that is neither minimized nor holding its app, and it reached the list.
Such a frame now counts as hidden when it is on the current desktop; minimized
frames let go of their app too, so they stay listed.

The list switcher scaled every icon to 32 pixels and drew it larger at higher
scaling. It now fetches the program's icon at the size it is drawn, as the
icon switcher does.
The switcher builds its list inside a low-level keyboard hook, where COM cannot
call out to another process, so asking whether a cloaked window is on the
current desktop failed and the window counted as shown: a UWP app closed to the
background, such as Realtek Audio Console, was listed. The question is now asked
from a thread pool thread when that happens.
Waiting for a thread pool thread inside the keyboard hook could time out, and several waits could outlast the time Windows gives a low-level hook before removing it. The answer from the window's last check stands, and a pool thread refreshes it for next time.
Some apps give a 256 pixel icon, and the badged icon made from it was drawn across the group's whole tile in the Windows Alt+Tab.
@leafOfTree leafOfTree changed the title Taskbar previews: fit tall windows, show hidden tabs, fix failing previews Taskbar previews and Alt+Tab fixes: hidden tabs, minimized groups, ghost UWP windows, sharp icons Oct 10, 2026
@leafOfTree
leafOfTree merged commit ba1ba44 into master Oct 10, 2026
2 checks passed
@leafOfTree
leafOfTree deleted the taskbar-preview-cache branch October 10, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant