Repository navigation
Conversation
Draw it on the alternate screen, which has no scrollback, and turn off alternate scroll so the wheel isn't sent as arrow keys. Restore both on exit, after ttfx is stopped so no frame lands on the normal screen.
Contributor
[Low impact] The change is limited to the terminal screensaver workflow. The PR appears safe to merge, with a non-blocking shutdown race when the screensaver runs in an ordinary terminal. Findings
SummaryMoves the terminal screensaver onto the alternate screen and disables wheel-to-arrow input while it runs.
Reviews (1) · Last reviewed commit: "Keep the terminal screensaver from scrol..." · Reviewed by Greptile |
Collaborator
|
Thanks for tracking this down! 4.5.1 now ships 4.6's native Wayland screensaver (#19068) in place of the terminal one. It draws its own overlay, so there's no scrollback to scroll into, and any scroll closes it. Closing as superseded. |
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.
Closes #18230
What changes
omarchy-screensaverdraws on the terminal's primary screen, andttfxnever switches to the alternate one. In Ghostty, Shift+PageUp, the mouse wheel or the touchpad scroll the animation up into the scrollback and show a scrollbar, and the screensaver stays up.\033[?1049h) before anything is drawn. It has no scrollback, so there is nothing to scroll. It's done in the script, so the fix covers every supported terminal rather than only Ghostty's config.\033[?1007l), so a wheel scroll is not sent to the script as arrow keys. Scrolling does nothing instead.exit_screensaverrestores both afterpkill -x ttfx. In the screensaver window this is never visible, because the same function closes the window right after. It matters when the script is run by hand in another terminal. There,pkilldoesn't wait for ttfx to exit, so a frame it is still drawing can land on the normal screen. That is cosmetic, soexit_screensaverdoesn't wait for ttfx the wayomarchy-system-lockdoes since Wait for ttfx before closing its terminal #6773: the abort that wait prevented no longer happens (see Verification).quattroreplaced the terminal screensaver with a native one, so this only applies to the 4.5 branch.Verification
Ghostty 1.4.0, stock
default/ghostty/screensaverconfig and stock banner, launched with the screensaver class on its own special workspace:foot 1.28.0, the default terminal, with stock
default/foot/screensaver.ini, launched the same way:Closing the terminal right after
pkill -x ttfx, asexit_screensaverdoes, used to make ttfx abort with a core dump (#6762). With ttfx 0.5.0-3 in foot, runningomarchy-system-lockwith itspidwaitremoved while the screensaver was up, at a random point in the effect: 10 runs, no ttfx core dumps (coredumpctl list /usr/bin/ttfx). The current lock: 20 runs, none either.Not checked: real mouse wheel or touchpad input and the ttfx abort check in Ghostty, and Alacritty and kitty at all.
No test added: three lines of escape sequences, and no existing test covers this script.