Slider PopupDisplayCompnent glitches since

This change:

Which was a fix for OSX 10.11 causes glitches on 10.8.5 with a Slider when the PopupDisplayComponent width changes. Reverting to before the changes fixes the problem.

Video: (Flash required)


That's odd, can't see how it'd fail to work, even on old OSes.

I'd need to reproduce it to find a fix - do you have any standalone code I could use to make this happen?

Just take the demo plugin and add

at line 66.

Then change the ParameterSlider::getTextFromValue() code to:

You’ll notice that as soon as the popup output changes size then you get artifacts (I made it randomly change the string length to really show the issue). If you maintain a constant popup size then there are no glitches.

Using the version before the change - there are no glitches.


I got glitches here too (on 10.8)

The reason I made those changes is because on 10.11 the OSX repaint behaviour seems to have changed, and the old code (where it told the window to display itself each time it resizes) began causing really nasty performance issues where the OS fails to batch-together a sequence of repaints, and instead queues and replays them all as you drag windows around.

So I changed it to do an asynchronous repaint when the window size changes. And it sounds like it's this async repaint that you're seeing, i.e. the OS is failing to repaint quickly enough and dropping a frame, which you're seeing.

Not really sure what to do about that. I can't put back the old code without bringing back the old bug..

Can you (or anyone) confirm whether this "glitch" happens on 10.11? If not then the answer is pretty easy: enable the old code on 10.10 and earlier, and the new version on 10.11. But I don't have 10.11 to test on right now..

I can confirm that there’s no glitch on 10.11

Ok, then is everyone on their various OSX versions happy with this:

    void setBounds (const Rectangle<int>& newBounds, bool isNowFullScreen) override
        fullScreen = isNowFullScreen;
        NSRect r = makeNSRect (newBounds);
        NSSize oldViewSize = [view frame].size;

        if (isSharedWindow)
            r.origin.y = [[view superview] frame].size.height - (r.origin.y + r.size.height);
            [view setFrame: r];
            static bool isPre10_11 = SystemStats::getOperatingSystemType() <= SystemStats::MacOSX_10_10;

            [window setFrame: [window frameRectForContentRect: flippedScreenRect (r)]
                     display: isPre10_11];

        if (oldViewSize.width != r.size.width || oldViewSize.height != r.size.height)
            [view setNeedsDisplay: true];


fine on 10.8

Thanks Jules.

Tests good on 10.8.5 and 10.11