Conversation
The frame flow consumed requested_size with swap(None) *before* calling context.request_resize(). Synchronous hosts read Editor::size() inside that call, so standalone (GuiTask::Resize) and CLAP (host_gui->request_resize) received the *previous* size: the egui surface scaled immediately while the OS window was resized one interaction behind — the reported macOS standalone symptom (skin shrinks, window stays; growing shrinks the window). Peek requested_size first, call the host while the pending value is still observable, and only then consume it. Hosts that read asynchronously (VST3 IPlugFrame via a posted task) are unaffected — they already read after size.store(). When the host refuses (AUv2 has no resize API) the request is dropped as before instead of retrying every frame. Verified by instrumentation on the macOS standalone: with the fix, each queued GuiTask::Resize carries the requested size (previously it carried the stored one).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
AUD-1611 follow-up to the enzyme resize work (enzyme PR robbert-vdh#30/robbert-vdh#31).
The frame flow in
nih_plug_eguiconsumedrequested_sizewithswap(None)before callingcontext.request_resize(). Synchronous hosts readEditor::size()inside that call, so:GuiTask::Resize) and CLAP (host_gui->request_resize) received the previous size — the egui surface scaled immediately while the OS window resized one interaction behind (macOS standalone: skin shrinks, window stays; growing shrinks the window).IPlugFrame::resizeViewis posted as a task and reads the size aftersize.store().Fix: peek
requested_size, call the host while the pending value is still observable, consume after; drop the request when the host refuses instead of retrying every frame.Verified by instrumentation on the enzyme macOS standalone: with the fix, each queued
GuiTask::Resizecarries the requested size (previously the stored one).