Repository navigation
Conversation
Explorer shows its taskbars again whenever the work area changes, as when the dock's space comes or goes on switching between autohide and Keep the dock visible. The show hook hides them again, but only after they have drawn, so they flashed several times for about 250 ms (SumirSeth#18). While hidden, each taskbar now also gets an empty window region, so such a show draws nothing. The region is set only once the taskbars are hidden, and removed before a peek and on restore, including the watchdog's. Measured over 10 mode switches on a second screen: 56 captured frames showed the taskbar before, none after. Fixes SumirSeth#18 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Appreciate the PR. I have some local code for this fix, I'll see how our approaches overlap (or don't) and get this merged as appropriate. |
Explorer gives each taskbar a rectangular window region the size of the window. The first version set no region on restore, which left the second screen's taskbar without one until Explorer laid it out again. The snapshot now keeps each taskbar's own region, and a peek or restore, including the watchdog's, sets it again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Correction pushed (6ba85ba). The first version assumed Explorer's taskbars have no window region of their own. They do: a simple region the size of the window ( Now Checked after the change:
Startup. While checking this, I noticed the first hide at startup sometimes fails ("A taskbar remained visible after SW_HIDE"). The hider is then restored and retried, and the taskbar stays visible for 3.8–6.6 s. This also happens without this PR:
The samples are too small to say whether this PR changes the rate, so I'm not claiming it doesn't. I'll open a separate issue for the startup failure itself. |
What changed
While Wisp hides the taskbars, each one now also gets an empty window region (
SetWindowRgn). If Explorer shows a taskbar, it draws nothing. The region is set only once the taskbars are hidden, and removed before a peek from the chevron menu and on restore (also from the watchdog, which usesrestore_snapshot).Why
Switching between autohide and Keep the dock visible adds or removes the dock's app bar, which changes the work area. Explorer then shows its taskbars again, roughly 250–350 ms later and several times in a row. The show hook hides them, but only after they have drawn, which is the flash in #18. A direct test confirmed the trigger:
SPI_SETWORKAREAwithSPIF_SENDCHANGEmakes Explorer show its taskbars immediately; without the broadcast it doesn't.On the primary screen the shown taskbar is mostly the collapsed auto-hide strip, so the flash is most visible on secondary screens, where
Shell_SecondaryTrayWndsits fully on screen when shown.Clipping a taskbar while it's still visible made Explorer show it again, so the region goes on only after the hide has been verified.
How I checked it
Windows 11, two screens (2560×1440 primary and 1920×1080 secondary, both at 125%),
hide_taskbar = true.dock_autohide10 times (5 cycles) throughWM_APP + 6and captured the bottom strip of the secondary screen every ~12 ms. Frames that showed the taskbar: 56 on unmodifiedmain(every switch), 0 with this change.IsWindowVisibletoggles as before), but the region stays empty. Explorer sometimes drops the region on a secondary taskbar while it's hidden; the next reapply sets it again.maindoes too, so it isn't caused by this change.cargo fmt --checkand both clippy runs pass. On my machine (German Windows),cargo testfailscommands::time::tests::finds_cities_in_the_windows_zone_listandcommands::tests::finds_power_commands_time_and_settings; both fail the same way on unmodifiedmain.Not tested: Windows 10, virtual desktops, a peek from the chevron menu after the change.
Fixes #18
🤖 Generated with Claude Code