LandingEllipse/kitti3

`on_spawn` event handler not active immediately after registration

LandingEllipse opened this issue · 1 comments

It would be nice to be able to register the on_spawn handler on demand from within spawn (i.e. when we know a new window will be created soon-ish), and allow the former to simply de-register itself after its done. This would would stand in contrast to the current scheme where on_spawn is registered on Kitti3 instantiation and kept active indefinitely, which while admittedly not an issue performance wise, is less neat.

However, although the window::new event does not trigger until ~0.2s (on my system) after spawn has initiated the creation of the Kitty window, if on_spawn is registered from within spawn it appears to, for an unknown reason, miss the window::new event in question.

Retiring this issue as a stable workaround seems unlikely and the current approach results in very little overhead anyway.