Hi Jules,
i’m using the latest version from SVN. I opening a popup menu in my plugin ( with show and showAt ). When i click on the first monitor, it appears on the second.
That was not the case with an earlier version.
With the old version of Desktop::getMonitorAreaContaining (changed on 15.Nov) the problem does not happen.
[code]/* !new version
const Rectangle Desktop::getMonitorAreaContaining (int cx, int cy, const bool clippedToWorkArea) const throw()
{
Rectangle best (getMainMonitorArea (clippedToWorkArea));
double bestDistance = 1.0e10;
for (int i = getNumDisplayMonitors(); --i > 0;)
{
const Rectangle rect (getDisplayMonitorCoordinates (i, clippedToWorkArea));
const double distance = juce_hypot ((double) (rect.getCentreX() - cx),
(double) (rect.getCentreY() - cy));
if (distance < bestDistance)
{
bestDistance = distance;
best = rect;
}
}
return best;
}*/
const Rectangle Desktop::getMonitorAreaContaining (int cx, int cy, const bool clippedToWorkArea) const throw()
{
for (int i = getNumDisplayMonitors(); --i > 0;)
{
const Rectangle rect (getDisplayMonitorCoordinates (i, clippedToWorkArea));
if (rect.contains (cx, cy))
return rect;
}
return getMainMonitorArea (clippedToWorkArea);
}[/code]