Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Should we guarantee no events when the application loop is not running #32

Open
richard-uk1 opened this issue Nov 22, 2022 · 1 comment

Comments

@richard-uk1
Copy link
Collaborator

I'm currently on x11 running the gpu example and getting a size event upon window creation, before app.run(). Should this event be deferred until then?

@raphlinus
Copy link
Contributor

This is all pretty deep water, and I'm inclined not to make any deep changes right now, but rather basically follow what Druid does re event loop and window lifecycles, ie make changes in xilem to accommodate the nondeterminism in events. Currently in xilem, running the app render is too closely tied to paint.

Getting a size (and scale for that matter) really early in window creation makes a lot of sense. In fact, we probably should document it as an invariant that you get one before the first paint cycle.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants