Hello
This is more of a Cocoa question than an FLTK question, but since my experience with stackoverflow regarding anything Cocoa or Objc related hasn't been stellar, I thought I'd ask here.
Apps running on MacOS's dark mode benefit from desktop tinting. So even if I get dark mode's windowBackgroundColor using:
void get_windowBackgroundColor(double *r, double *g, double *b, double *a) {
NSColor *c = [NSColor windowBackgroundCOlor];
NSColor *s = [i colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]];
[s getRed:r green:g blue:b alpha:a];
}
I use the values to set the FL_BACKGROUND_COLOR or the window's color and they would be correct when disabling desktop tinting, but with desktop tinting enabled, the colors would be off.
NSColor has a static method, currentControlTint, but it always returns a Blue tint enum value regardless of the desktop color. I have tried enabling transparency of the window using NSWindow's -setAlphaValue:, it helps but only if the window is directly on top of the desktop.
Is there something I'm missing?
Is there a way to programmatically get the current desktop tint and somehow apply it to an FLTK window?
Thank you