Skip to content
Discussion options

You must be logged in to vote

Ok, nevermind. I fixed this for switching screens by using on_screen_resume and on_screen_suspend events, and for quitting I simply did this in the on_quit function:

  1. check if the current screen is the one which needs to be cleaned up, and if no just exit and do nothing else
  2. otherwise, run a special worker on the screen instance which in the end calls the app.exit function
  3. if the user presses ctrl+q again while worker is running, app cancels the worker and exits immediately

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by roundedrectangle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant