Window scaling with OpenGL context

I’m in trouble of scaling window on Mac with attaching OpenGL to TopLevelComponent.
I’m trying to scale by these,

juce::Desktop::getInstance().setGlobalScaleFactor(s);
this->setSize(width, height);|

These work fine without attaching openGLContext, but doesn’t work properly with attaching to TopLevelComponent.
Screen Shot 2022-02-17 at 11.38.46 AM

I’m attaching the simple test codes, this has one child component having textButton to control scaling.

Source.zip (8.0 KB)

I’d appreciate if I could have pointers.

This looks like a bug in JUCE itself. I’ll get that fixed shortly.

1 Like

Thanks for reporting this issue. It should now be fixed on develop:

1 Like

Thank you reuk. This has been fixed.

Hi reuk,
It seems this hasn’t been fixed completely on vst3.

It get to be like these when I scale on DAW,
100% to 130%

130% to 100%


It becomes properly scaled once close and open the window. AU, vst2 and standalone app work properly.
I didn’t notice this because I checked on standalone app only.