Calloutbox in Mojave broken?


I’m currently developing a small cross-platform utility app and I built it yesterday for the first time since updating to Mojave.

The update seems to have broken calloutbox’s. When attached to the desktop they no longer have a transparent window - instead they have an ugly filled window behind.

The fill colour changes according to light/ dark mode so I guess this is the culprit.

Has anyone else seen this ? Any workarounds ?
Any chance of a quick fix ? If not I’ll have to rethink my UI…

Many thanks.

The JUCE code for this component will probably have to be updated to the newest macOS SDK. The “quick fix” would be doing this yourself and submitting a PR.

1 Like

Fantastic… Huge thank you!

Thanks for reporting!

This transparency fix won’t work if the executable is build on an older version of OSX right? Shouldn’t you be checking the version runtime?

Why are you checking the 10_14 version anyways, setBackgroundColor is now always called regardless the version the executable is running on because it’s set at compile time. btw setBackgroundColor method is available since 10.10 so wouldn’t the following code make more sense?

		static bool is10_10 = SystemStats::getOperatingSystemType() >= SystemStats::MacOSX_10_10;
		if (! [window isOpaque] && is10_10)
			[window setBackgroundColor: [NSColor clearColor]];

The transparency change is part of the macOS 10.14 SDK, so when you compile against an older version of the SDK it will work correctly hence the check at compile time.

O.K. thanks for clarifying. But do we need the macro at all then?
I mean it won’t do any harm setting the background color always will it? Now the macro is confusing.

The code surrounded by the #if defined (MAC_OS_X_VERSION_10_14) is only necessary when compiling against the 10.14 SDK, so it’d be pointless to do it for all SDK versions.