Codes in MainActivity about a window are moved to WinActivity, and MainActivity becomes the subclass of WinActivity;
A listener object (IPythonWin) is now for a window but not for the whole application;
Use intent to create new window, with the python id of the listener object (IPythonWin) passed, and then the id will be used to get (IPythonApp.getPythonWinById) the listener of the new window;
With toga part: https://github.com/beeware/toga/pull/1394
What have been done:
MainActivity
about a window are moved toWinActivity
, andMainActivity
becomes the subclass ofWinActivity
;IPythonWin
) is now for a window but not for the whole application;IPythonWin
) passed, and then the id will be used to get (IPythonApp.getPythonWinById
) the listener of the new window;onDestory
event.PR Checklist: