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

reduce jank #5183

Merged
merged 2 commits into from
Oct 27, 2024
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
5 changes: 3 additions & 2 deletions src/textual/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1205,8 +1205,9 @@ def _get_inline_height(self, size: Size) -> int:

def _screen_resized(self, size: Size):
"""Called by App when the screen is resized."""
self._compositor_refresh()
self._refresh_layout(size)
if self.stack_updates:
self._compositor_refresh()
self._refresh_layout(size)

def _on_screen_resume(self) -> None:
"""Screen has resumed."""
Expand Down
1 change: 1 addition & 0 deletions src/textual/widgets/_footer.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ async def bindings_changed(self, screen: Screen) -> None:
await self.recompose()

def on_mount(self) -> None:
self.call_next(self.bindings_changed, self.screen)
self.screen.bindings_updated_signal.subscribe(self, self.bindings_changed)

def on_unmount(self) -> None:
Expand Down
Loading