Small update, I’ve just updated to Logic Pro 10.6.3 on Big Sur 11.3 and the bug is still there. I’ve contacted another person at Apple and the feedback I submitted was moved to macOS. This is their response:
We found the feedback, it’s on the macOS side – we already assumed that it had nothing to do with Logic. My guess would be: it happens, because Logic is built against a recent SDK, which changes some behaviors inside macOS.
Ok, I finally have a full answer and will update the ProAudio Seed Release Notes accordingly. Please check them regularly.
Windows opened by the plugin might have a subtle magenta tinting. This is security feature, not a bug. It avoids that malicious code can open a window which overlays system windows. There are a couple of ways to avoid this tinting:
Make the window less transparent (75% or more opacity will avoid this tinting)
Call -[NSWindow addChildWindow:…]. This will confine the magenta to the remote view, which spawns the child.
Use a standard window to obtain rounded corners without using a transparent background color.
Hi Markus, thank you for the update!
Reducing the transparency unfortunately is not great with rounded corners.
Regarding the other solutions, I’m not sure if JUCE can implement them directly? I hope so.
Unfortunately, popup menus are also used in ComboBoxes to display the popup list of values, and having a native menu appearing under a custom designed widget would feel strange.
And also, It’s not just an issue with popup menus: the same magenta coloring is overlaid to rows of lists when they are dragged around, for example. And I suppose also to the semi-transparent drag image that appears when a drag gesture is started with DragAndDropContainer::startDragging()
Unfortunately I don’t think any of the suggestions would resolve the problem.
This won’t allow popup windows to have completely transparent rounded corners.
This initially seemed like a viable solution, but it seems that any part of the child window that is not on top of the parent window is still painted with a magenta background. To test, I applied this patch:
Then, I built the DSPModulePluginDemo AU and loaded it in Logic on an M1 mac. Popup menus which are not entirely contained by the editor window sill have partially magenta backgrounds.
This is not a general solution, it only fixes the case where the desired corner radius matches that set by the OS. It doesn’t fix the issue for windows with a translucent background.
This would force the menu to use OS styling, which may not be acceptable to some developers. It would also only provide a solution for PopupMenus. This solution would not work for arbitrary floating widgets such as dragged items, tooltips and so on.
All this is to say that I still think the solution that will yield the most consistent results across platforms is to avoid opening new top-level windows entirely, and to draw widgets such as menus, tooltips, and dialogs directly into the editor window wherever possible.
I casually noticed that this workaround is not working any longer. Despite I have my LaF class taking the topLevelComponent, the behavior on Logic is not the same as before: magenta overlay on transparencies and menus going out the plugin boundaries.
EDIT: I tested a plugin built with 6.0.8 and it works as expected on Logic Pro X. New plugins and updates I’m building with 6.1.5 (so no changes made on the LaF), are showing the issue. I need to figure out what changed in between and why Component* getParentComponentForMenuOptions (const PopupMenu::Options&) override won’t get called.
@reuk I can confirm that the problem is because of plugins running in their own process. I could trigger the same pink issue with an Intel plugin running in Silicon Reaper. This so called security measure of apple is stupid to say the least
The magenta backgrounds are present on all secondary windows in out-of-process-hosted AUv3 plugins. If you’re testing in AUv3, then the answer is probably yes, but there’s not enough detail in the question to know for sure. I haven’t seen the exact issue you’re talking about. Do you see the problem in all formats, or in specific ones? On which platforms, and in which hosts?