A user reported an issue that the popup menu opens on the wrong display. It looks like only one of our plugins is affected and i’m not sure what could lead to that issue. I wasn’t able to reproduce the issue. Here a video that shows the problem:
The target component where i attach the popup menu is on the correct position. Anyone has an idea what can go wrong and what i can do to avoid the issue?
I also noticed following issue on windows while trying to reproduce this:
Thanks for asking. I’m not sure about the wrong screen issue. I let you know if i get some feedback about it.
But the popup still opens at the wrong position (connect a 4k TV screen and use it as a second screen in windows - the popup menu has an offset and isn’t at the right position). I have tested this with a retina mac book pro and a sony tv hdmi input (with parallels). Maybe a very special configuration, but the issue was also reported here:
Just re-checked. I’m using the latest develop and the problems with the popup are the same. The user also reported that the popup still shows up on the wrong screen. All works fine on OSX.
The user investigated a bit more and it looks as scaling is involved with the issue. Our plugin is scalable. He noticed following (popup on wrong screen):
Restore Original Size the issue went away, and slowly enlarging it, there is a point when the issue still isn’t manifesting but resizing larger than that it shows up.
We scale the plugin with following code (we have a component that we can scale on top of the plugin component):
Not 100% sure it would work and fit your needs, but perhaps as a workaround (until Ed fixes that) you can give a parent component to your popup via withParentComponent().
The problem persists also with the latest release. It looks like there is an error in the popup position calculation under some special conditions with multiple screens and scaling on windows.
it’s my main screen (I don’t have any external screen connected).
I don’t have any particular scale factor. in parallels, I use the ‘best for retina’ option.
I was able to reproduce the wrong popup position with a 4k TV connected to my macbook running parallels with a HD cable. Im also using “Best for Retina display”.
I didn’t test DSPModulePluginDemo so far.
The user has the wrong position with two screens connected to a “normal” windows machine. The offset is so big, that the popup shows up in the other monitor. But the y position seems to be right in this case. And it only happens when the plugin is scaled some ratio. It’s hard to reproduce because i don’t have a two monitor setup where i can test that special case. Hope i have time to make a demo project in the near future.
I forgot to mention that I only have this problem with JUCE_WIN_PER_MONITOR_DPI_AWARE (1)
Also my resizable plugin does not resize properly in Reaper when that flag is on.
the resizing is not smooth (dragging the resizableCorner) as it is without JUCE_WIN_PER_MONITOR_DPI_AWARE, the plugin size is ‘jumping’.
I’ll test on a proper windows installation (i.e not in parallels) tomorrow