Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background refresh #3061

Merged
merged 2 commits into from
Aug 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

### Fixed

- Fixed background refresh https://github.com/Textualize/textual/issues/3055


## [0.32.0] - 2023-08-03

### Added
Expand Down
5 changes: 4 additions & 1 deletion src/textual/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2333,7 +2333,7 @@ def _display(self, screen: Screen, renderable: RenderableType | None) -> None:
"""

try:
if screen is not self.screen or renderable is None:
if renderable is None:
return

if (
Expand All @@ -2342,6 +2342,9 @@ def _display(self, screen: Screen, renderable: RenderableType | None) -> None:
and not self.is_headless
and self._driver is not None
):
if screen is not self.screen:
self.screen.refresh()
return
console = self.console
self._begin_update()
try:
Expand Down
2 changes: 1 addition & 1 deletion src/textual/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def is_current(self) -> bool:
from .app import ScreenStackError

try:
return self.app.screen is self
return self.app.screen is self or self in self.app._background_screens
except ScreenStackError:
return False

Expand Down
Loading