Repository navigation
Conversation
On a busy Explorer, the first hide often failed: right after Wisp turned on auto-hide, Explorer showed a hidden taskbar again within a few milliseconds, most often a second screen's. The first hide then dropped the controller, which restored the taskbar, and tried again two seconds later with a new watchdog. Later failures already keep the controller, so the show hook hides the taskbar on Explorer's next show. The first hide now keeps the controller too. Under load, the taskbar was last visible after a median of 9.4 s before (and stayed visible in 8 of 10 starts), and after 0.86 s now. Fixes SumirSeth#28 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What changed
TaskbarHider::configurenow keeps the controller when the firstreapplyfails, the same way later failures already work.hide()is renamed tostart()(private): it takes the snapshot and starts the watchdog and the show hook.configurestores the controller first and then callsreapply.Why
This is the Explorer interaction from #28. Explorer and Wisp events side by side, from an out-of-process WinEvent hook on Explorer plus timestamps in Wisp:
While Explorer is still switching the primary taskbar to auto-hide (it keeps moving it until about 650 ms), it shows a second screen's taskbar again right after Wisp hides it. On the first hide, Wisp treats that as fatal: it restores the taskbar, starts a new watchdog and tries again 2 s later. Later failures already keep the controller, and the show hook hides the taskbar on Explorer's next show. The first hide now works that way too.
If every retry fails, the outcome is the same as for a failure later on: after
TASKBAR_ATTEMPTSthe user gets the "Could not change the taskbar" notification, and the controller stays until Wisp quits orhide_taskbaris turned off, both of which restore the snapshot.How I verified it
Windows 11 26H2 (build 26300, de-DE), 2560×1440 at 125% plus a 1920×1080 second screen,
position = "bottom", Keep the dock visible,hide_taskbar = true. Wisp was started repeatedly (quit throughWM_APP + 4, 4 s pause). A probe recorded when Explorer's taskbars were last visible, how many watchdogs started and how long the launcher window took to answerWM_NULL.Normal conditions:
Under load (an out-of-process WinEvent hook on Explorer's show, hide and move events, which makes the first-hide failure happen in almost every start), both builds with the same tracing:
mainOn this branch the first
reapplystill fails 1–2 times per start under load, but the show hook hides the taskbar right after.Performance
Startup: the taskbar is hidden at the same time as before when nothing goes wrong (0.79–0.90 s vs 0.74–0.99 s), and much sooner when the first hide fails (see above). The longest wait for the launcher's UI thread during startup is unchanged (250–330 ms in both builds; it comes from the existing synchronous
ABM_SETSTATEandShowWindowcalls). Drawing, the dock and the launcher are not touched.measure-perf.ps1runs the demo withhide_taskbar = false, so it doesn't exercise this code.Not tested
Windows 10, a single screen (the failure I traced involved the second screen's taskbar), virtual desktops, and Explorer restarting while Wisp starts.
Fixes #28
cargo testfails the two tests from Time search misses English city names on non-English Windows #26 on my German Windows, the same as onmain.Unreleased, or this has nothing users notice.🤖 Generated with Claude Code