Repository navigation
Conversation
The hidden dock checked the pointer every 100 ms, so it started to slide in up to 100 ms after the pointer reached the bottom edge (SumirSeth#20). While the pointer is in the lower third of a screen, it now checks every 15 ms. Once the dock is shown, it goes back to 100 ms, so it still hides after the same half second away. Over a full-screen app it keeps the slow poll. Measured with a fast 80 ms move to the edge, from arrival to the dock showing: median 47 ms and up to 89 ms before, median 3 ms and up to 27 ms after. Fixes SumirSeth#20 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
While the autohide dock is hidden and the pointer is in the lower third of its screen, the dock checks the pointer every 15 ms instead of every 100 ms (
NEAR_POLL_MS). Elsewhere, over a full-screen app, and whenever the dock is shown, the poll stays at 100 ms. That keepsHIDE_AFTERat the same half second.Why
The reveal waited for the next 100 ms poll, which added 0–100 ms before the slide even started (#20). Of the options in the issue I chose faster polling near the edge:
The lower third is big enough that a quick move to the edge usually passes through it before the next slow poll.
How I checked it
Windows 11, 2560×1440 at 125% plus a second screen,
position = "bottom",dock_autohide = true. A script parked the pointer at y=600, waited for the dock to hide, moved the pointer to the bottom edge, then timed from arrival until the dock window showed (15 trials each):mainThe jump case doesn't benefit by design, since no poll sees the pointer near the edge first; it shows the old range for reference.
CPU, dock hidden, pointer still for 20 s: below the 15.6 ms resolution of the process timers in both builds (0–31 ms per 20 s, under 0.2 %).
cargo fmt --checkand both clippy runs pass.cargo testfails the same two tests as on unmodifiedmainon my German Windows (commands::time::tests::finds_cities_in_the_windows_zone_list,commands::tests::finds_power_commands_time_and_settings).Not tested: Windows 10, virtual desktops, the dock on a secondary screen's edge (the check uses the pointer's own monitor, like
at_bottom_edge).The hide delay of about 0.6–0.7 s is unchanged; the issue calls it by design.
Fixes #20
🤖 Generated with Claude Code