RFR: 8357067: Platform preference change can emit multiple notifications [v2]

Michael Strauß mstrauss at openjdk.org
Thu May 15 20:37:00 UTC 2025


On Thu, 15 May 2025 20:25:37 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>> A single user-facing setting change should only result in a single change notification in JavaFX, as that's what developers would intuitively expect. I'm planning to add support for CSS system colors soon, which basically exposes platform colors to stylesheet authors. When the color palette changes, I want all changes to be applied at the same time and not piece by piece.
>
> Are you sure a delay is a good way to solve this?  It won't guarantee that no inconsistent states will be observed (what if Windows is slower, or a change is reverted within the delay period -- you may still see "half" changes).

I don't think that there's a perfect way to solve this. Yes, this can theoretically happen, and then you'll see a visual glitch. I can imagine that this might also be the reason why Windows shows a full-screen popup when you switch to and from a high-contrast theme: to hide glitchy applications during the transition period.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1810#discussion_r2091919919


More information about the openjfx-dev mailing list