snowcap: pool surface events on update #379
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #364, here is the standalone PR for snowcap event pooling.
This fix an issue that arose when more than one events are either generated before the config have had the time to generate a new view, or while the view was "in flight"
As an example, if we take a mouse area:
MsgPress{1}&MsgDoubleClick{1}.MsgPress{1}, update itself and generate a new view. MouseArea now has the id 2.MsgDoubleClick{1}, the event is discarded because there are no widgets with this id.This PR does two thing: Pool events so the config gets every pending events at once, and buffer events if we're expecting a new view, meaning the config will always receive all events available and that said events will always be "in sync" with the view.