Under Mojave, and under the System preferences custom pane of my screensaver, the Close button of [NSColorPanel sharedColorPanel] is not visible.
I am asking for your help/advice to bring it back.
I am using [NSColorPanel sharedColorPanel] to let the user select a custom color that will be used in my screensaver's rendering of sprites.
Under Mojave this panel stopped having a close button and the user cannot complete the selection. The panel is shown as modal and the user can only force quit via the System preferences (because this is a screensaver, its configuration dialog is being run as a preference pane from the System preferences).
This does not happen in versions previous to Mojave.
To make it more complex, I also have an .app version of the screensaver and the Close button is appearing Ok there.
The .app version is a standalone app and does not run via the ScreensaverEngine like the screensavers.
NSColorPanel *panel; // weak ref
panel = [NSColorPanel sharedColorPanel];
[panel setShowsAlpha:NO];
[panel setColor: color ];
[panel setDelegate:self];
[NSApp runModalForWindow:panel]; // <- does not return from that call
[panel setDelegate:nil];
NSColor *result=panel.color;
[panel close];
I tried to enable the button by
[[panel standardWindowButton:NSWindowCloseButton] setEnabled:YES];
[[panel standardWindowButton:NSWindowCloseButton] setHidden:NO];
but it did not help.
You can see the missing Close button on this screenshot https://user-images.githubusercontent.com/4344442/51428774-5f927900-1c10-11e9-8441-ec85e71534c7.png I can also give the public download URLs of the .saver and .app versions if this would help.