feat(notify): surface background-tab notifications even when termherd is focused#134
Merged
Merged
Conversation
vte/alacritty_terminal already discards unrecognised OSC/DCS/APC sequences cleanly, so #85's stated symptom doesn't reproduce. No slice is cheap: even a placeholder render needs the chunked-payload reassembly the OSC status codec explicitly doesn't do, across three incompatible protocols. Zero demand signal beyond the filed issue.
… is focused (#86) core now tracks OS window focus (Event::WindowFocusChanged, wired from iced's window::Event::Focused/Unfocused) and notify_session skips the OS banner only when the notifying session is both the active tab's focused pane and the window has focus. Any other live session - including a background tab while termherd is focused - still gets the effect, since the OS's own per-window suppression only covers the tab the user is actually viewing.
231e979 to
35f65c2
Compare
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
corenow tracks OS window focus (Event::WindowFocusChanged, wired from iced'swindow::Event::Focused/Unfocused), which it previously ignored.notify_sessionskips the OS banner only when the notifying session is both the active tab's focused pane and the window has focus. Any other live session — including a background tab while termherd itself is focused — still gets the effect, since the OS's own per-window suppression only covers the tab the user is actually viewing.Closes #86
Test plan
cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace(3 new unit tests: viewed-session dropped while focused, background-tab still posts while focused, viewed-session still posts while unfocused)