On Wed, 10 Sep 2025 23:10:22 GMT, Michael Strauß <mstra...@openjdk.org> wrote:
> 1. Replace undocumented `AppleColorPreferencesChangedNotification` with > `NSSystemColorsDidChangeNotification`. > 2. Replace undocumented `AppleInterfaceThemeChangedNotification` with a KVO > registration for `NSApp.effectiveAppearance`. > > This fix can be tested using either PlatformPreferencesChangedTest, or Monkey > Tester > Tools > Platform preferences monitor. I was able to test this on macOS 13, 15, and 26 RC. I only focused on changes to the dark/light appearance, accent color, and highlight color. All versions of the OS behaved identically and updated the platform preferences reliably. Under the hood I can see that `updatePreferences` can be called up to three times when the accent color changes. In most cases this leads to just a single set of changes being broadcast on the Java side. The exception is when I change the accent color to or from "graphite". When changing from "multicolor" to "graphite" I see three sets of changes each touching a different set of preferences with the exception of macOS.NSColor.keyboardFocusIndicatorColor which is changed twice, once in the second set of changes and again in the third. When changing from "graphite" to "multicolor" I see two sets of changes and macOS.NSColor.keyboardFocusIndicatorColor is altered in both of them. I don't consider these bugs but this is a change from the old behavior. "Graphite" is a special accent color which also affects things like the stoplight controls in the title bar which go grayscale. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1895#issuecomment-3286585962