Popup opens on wrong screen / position (Windows 10)


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 code looks like this:

void mouseDown (const MouseEvent& e)
        popupMenu.initializePopupMenu(&mainMenu, this->talCore);
        mainMenu.showMenuAsync (PopupMenu::Options().withTargetComponent (this).withMinimumWidth(this->getWidth() * this->talComponent->getTransform().getScaleFactor()),
                            ModalCallbackFunction::forComponent(optionsMenuStaticCallback, this));

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:


Can you try this with the latest tip of develop? There have been a number of improvements lately with hiDPI and scaling support on Windows.


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:


And this is using the latest tip of the develop branch from GitHub?


Yes, with the latest develop. I also didn’t expect that. I will re-verify my build again this evening or tomorrow.


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.


Hi Ed

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().

something like that :

auto* parent = findParentComponentOfClass<AudioProcessorEditor>();
mainMenu.showMenuAsync (PopupMenu::Options().withTargetComponent (this)
                                            .withParentComponent (parent)
                                            .withMinimumWidth (this->getWidth() * this->talComponent->getTransform().getScaleFactor()),
                                           ModalCallbackFunction::forComponent (optionsMenuStaticCallback, this));


Thanks for that one. I give it a try. Looks promising!