Skip to content

fix(app): refresh after suspend#6369

Open
TomJGooding wants to merge 1 commit intoTextualize:mainfrom
TomJGooding:fix-app-refresh-after-suspend
Open

fix(app): refresh after suspend#6369
TomJGooding wants to merge 1 commit intoTextualize:mainfrom
TomJGooding:fix-app-refresh-after-suspend

Conversation

@TomJGooding
Copy link
Collaborator

Fix the app display not refreshing after action_suspend_process.

A similar issue was reported in #5528 but specifically when using the App.suspend context manager. This was fixed in 81392ff by adding refresh(layout=True), however this doesn't cover when the app was suspended with action_suspend_process. This simply moves that call to refresh to account for both suspend methods.

Related issue: #6298

Fix the app display not refreshing after `action_suspend_process`.

A similar issue was reported in Textualize#5528
but specifically when using the `App.suspend` context manager. This was
fixed in 81392ff by adding `refresh(layout=True)`, however this doesn't
cover when the app was suspended with `action_suspend_process`. This
simply moves that call to `refresh` to account for both suspend methods.

Related issue: Textualize#6298
@willmcgugan
Copy link
Member

Can we have a test for this?

@TomJGooding
Copy link
Collaborator Author

Is it actually possible to test for this that involves suspending and resuming the app?

@willmcgugan
Copy link
Member

There is test_suspend.py. Looks like it mocks out the suspend functionality.

Maybe that can be extended with a simple check that refresh was called at the expected point?

@TomJGooding
Copy link
Collaborator Author

I had a look at the existing tests but they don't cover action_suspend_process which involves SIGSTOP/SIGCONT - sorry if I've misunderstood or missing something obvious?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants