Repository navigation
Taskbar previews and Alt+Tab fixes: hidden tabs, minimized groups, ghost UWP windows, sharp icons - #55
Merged
Conversation
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.
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Taskbar previews
WindowTabs Alt+Tab switcher
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.Docs
docs/taskbar-preview-width.mdrecords 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.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-threadSendMessage(an input-synchronous call). It fails without the fix.