Fix floatbar taskbar z-order#197
Merged
Merged
Conversation
Collaborator
|
Thanks for the PR, I will review this ASAP. |
Finesssee
approved these changes
Jul 17, 2026
Finesssee
left a comment
Collaborator
There was a problem hiding this comment.
Approved — thermo-nuclear + ponytail review
Root cause and repair primitive are correct: taskbar + floatbar share the topmost band; shell activation can reorder without clearing WS_EX_TOPMOST. Reasserting via SetWindowPos(HWND_TOPMOST | SWP_NOACTIVATE) after shell z-order events (and on move/resize) is the right Win32 fix.
Preferred cleanup (non-blocking; please track soon after merge):
- Filter WinEvent
hwndto taskbar shells (Shell_TrayWnd/Shell_SecondaryTrayWnd) before scheduling reassert — do not treat every system FOREGROUND/REORDER as relevant while the bar is active (overlap only gates repair, not main-thread work). - Consider a thinner trigger (visibility-scoped 100–150ms timer like
auto_refresh, or cut the hooks module roughly in half). 266 lines + globals is heavy for “debounce → apply_always_on_top”. - Clear
FLOATBAR_ACTIVEonDestroyed/ missing webview, not only happy-pathhide.
Ponytail: ~80–150 lines shaveable if timer path or filtered hooks + statics.
Shipping the user-visible fix now; structure cleanup is preferred follow-up, not a hard block.
Finesssee
marked this pull request as ready for review
July 17, 2026 03:36
This was referenced Jul 17, 2026
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
SetWindowPosfailures.Root cause
The Windows taskbar and the floatbar are both topmost windows. Clicking or reordering the taskbar can place it ahead of the floatbar within the topmost band without clearing the floatbar's
WS_EX_TOPMOSTstyle. The existing implementation only reasserted topmost state during show, resize, or settings changes, so it did not react to later shell z-order changes.User impact
A floatbar placed over an empty taskbar area remains visible after another empty taskbar area is clicked. The guard only repairs z-order while the floatbar actually overlaps a taskbar.
Validation
cargo +stable-x86_64-pc-windows-gnu test --offline --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml— 316 passed.cargo +stable-x86_64-pc-windows-gnu clippy --offline --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml --all-targets -- -D warnings— passed.pnpm test— 153 passed.pnpm run build— passed.pnpm run tauri:build:debug— passed.