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

2025-05-16 Thread Michael Strauß
> Some platform preference changes can trigger the emission of multiple > notifications. For example, when switching from a high-contrast theme on > Windows to the regular theme, the following notifications are emitted (log > can be viewed in `PlatformPreferencesChangedTest`): > > > changed: >

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

2025-05-15 Thread Michael Strauß
On Thu, 15 May 2025 20:43:00 GMT, John Hendrikx wrote: >> 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 sw

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

2025-05-15 Thread Michael Strauß
On Thu, 15 May 2025 20:25:37 GMT, John Hendrikx 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 >> expos

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

2025-05-15 Thread John Hendrikx
On Thu, 15 May 2025 20:34:21 GMT, Michael Strauß wrote: >> 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

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

2025-05-15 Thread John Hendrikx
On Thu, 15 May 2025 19:16:03 GMT, Michael Strauß wrote: > I am not comfortable with this change, as it falls under application > requirements. > > The function of the JavaFX platform is to communicate the OS events as > faithfully as it can, in my opinion The function of JavaFX is to abstract

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

2025-05-15 Thread John Hendrikx
On Thu, 15 May 2025 18:50:20 GMT, Michael Strauß wrote: >> If it takes that long to update all the colors, maybe we should not add >> complexity to this subsystem and just send the events as they come? >> >> What exactly is the problem the user experiences right now? > > A single user-facing se

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

2025-05-15 Thread Markus Mack
On Thu, 15 May 2025 18:56:14 GMT, Michael Strauß wrote: >> Some platform preference changes can trigger the emission of multiple >> notifications. For example, when switching from a high-contrast theme on >> Windows to the regular theme, the following notifications are emitted (log >> can be v

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

2025-05-15 Thread Michael Strauß
On Thu, 15 May 2025 19:00:01 GMT, Andy Goryachev wrote: > I am not comfortable with this change, as it falls under application > requirements. > > The function of the JavaFX platform is to communicate the OS events as > faithfully as it can, in my opinion. If the application requirements call

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

2025-05-15 Thread Andy Goryachev
On Thu, 15 May 2025 18:56:14 GMT, Michael Strauß wrote: >> Some platform preference changes can trigger the emission of multiple >> notifications. For example, when switching from a high-contrast theme on >> Windows to the regular theme, the following notifications are emitted (log >> can be v

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

2025-05-15 Thread Michael Strauß
> Some platform preference changes can trigger the emission of multiple > notifications. For example, when switching from a high-contrast theme on > Windows to the regular theme, the following notifications are emitted (log > can be viewed in `PlatformPreferencesChangedTest`): > > > changed: >

Re: RFR: 8357067: Platform preference change can emit multiple notifications

2025-05-15 Thread Michael Strauß
On Thu, 15 May 2025 18:35:47 GMT, Andy Goryachev wrote: >> Quite a lot, Windows takes around 1-2 seconds to change to and from a >> high-contrast theme (there's even a full-frame wait screen that pops up). >> The suggested delay of 1 second works reliably on my machine. > > If it takes that lon

Re: RFR: 8357067: Platform preference change can emit multiple notifications

2025-05-15 Thread Andy Goryachev
On Thu, 15 May 2025 18:28:59 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/native-glass/win/PlatformSupport.h line 75: >> >>> 73: * Suggested aggregation delay for changes that come in over a >>> period of time. >>> 74: */ >>> 75: static constexpr int SUGGESTED_DE

Re: RFR: 8357067: Platform preference change can emit multiple notifications

2025-05-15 Thread Michael Strauß
On Thu, 15 May 2025 18:11:17 GMT, Andy Goryachev wrote: >> Some platform preference changes can trigger the emission of multiple >> notifications. For example, when switching from a high-contrast theme on >> Windows to the regular theme, the following notifications are emitted (log >> can be v

Re: RFR: 8357067: Platform preference change can emit multiple notifications

2025-05-15 Thread Michael Strauß
On Thu, 15 May 2025 18:13:35 GMT, Andy Goryachev wrote: >> Some platform preference changes can trigger the emission of multiple >> notifications. For example, when switching from a high-contrast theme on >> Windows to the regular theme, the following notifications are emitted (log >> can be v

Re: RFR: 8357067: Platform preference change can emit multiple notifications

2025-05-15 Thread Andy Goryachev
On Thu, 15 May 2025 17:50:50 GMT, Michael Strauß wrote: > Some platform preference changes can trigger the emission of multiple > notifications. For example, when switching from a high-contrast theme on > Windows to the regular theme, the following notifications are emitted (log > can be viewe