You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Kitty resumes after SIGCONT, it restores the alternate screen buffer with transparency compositing applied. The diff render then skips cells that haven't changed, so the transparency persists since nothing in the UI actually changed during suspension.
The fix is to call lib.render with force=true right after currentRenderBuffer.clear() in resume(). This bypasses the diff and repaints every cell immediately, overwriting whatever Kitty had in its restored buffer.
This is also why resizing fixes it, buffer.resize() clears both buffers which makes the diff see everything as dirty and forces a full repaint as a side effect.
this.currentRenderBuffer.clear(this.backgroundColor) was supposed to do that, but I guess behaviour might have changed recently when this.backgroundColor has alpha=0 it does not reset the cells. When we do a force re-render it will draw all cells and the currentRenderBuffer.clear becomes futile, so we would not need to do both.
I wonder if that is easily coverable with a test maybe, so it doesn't regress again 🤔
this.currentRenderBuffer.clear(this.backgroundColor) was supposed to do that, but I guess behaviour might have changed recently when this.backgroundColor has alpha=0 it does not reset the cells. When we do a force re-render it will draw all cells and the currentRenderBuffer.clear becomes futile, so we would not need to do both.
I wonder if that is easily coverable with a test maybe, so it doesn't regress again 🤔
removed the clear() call since the force render covers it. Also added a test that spies on lib.render and asserts force=true is passed on resume, so this should be covered against regression ig
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
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.
Fixes #922
When Kitty resumes after
SIGCONT, it restores the alternate screen buffer with transparency compositing applied. The diff render then skips cells that haven't changed, so the transparency persists since nothing in the UI actually changed during suspension.The fix is to call
lib.renderwithforce=trueright aftercurrentRenderBuffer.clear()inresume(). This bypasses the diff and repaints every cell immediately, overwriting whatever Kitty had in its restored buffer.This is also why resizing fixes it,
buffer.resize()clears both buffers which makes the diff see everything as dirty and forces a full repaint as a side effect.