Changing it to this should fix it: MessageManager::callAsync ([sp = SafePointer<VSTPluginWindow> (this), this] { if (sp != nullptr) componentMovedOrResized (true, true); });
or MessageManager::callAsync ([sp = SafePointer<VSTPluginWindow> (this)]() mutable { if (sp != nullptr) sp->componentMovedOrResized (true, true); });
I’m not sure what style is best tbh.
Yes, will put the first commit onto develop now - thanks for the reminder! The second only applies to some changes that were made on the juce6 branch though so no need for it to go on develop.
Ok. Interesting though I was seeing a deadlock on the Linux plugin hosting when trying to open a plugin window and dispatch the message loop. I was wondering if the second change was actually a fix to that…
It was a fix needed after this commit on the juce6 branch which removed the ScopedXDisplay from the SharedMessageThread. We need to initialise the X display here so adding the XWindowSystem::getInstance(); line to get the XWindowSystem singleton fixes it.
If you’ve got some code which reproduces the deadlock on develop then we can take a look.