On Sat, 12 Sep 2026 18:31:18 GMT, Kevin Rushforth <[email protected]> wrote:

> javafx.base: PlatformUtil - OS check that are not related to graphics (no 
> Glass or Prism related calls or properties) javafx.graphics: (need a good 
> name here) - Glass / Prism related platform checks

Pushed an idea for that. Renamed to `GlassPlatform`, as it reads out the system 
property with the same name.

> I'm OK with the idea of moving the parts that make sense in a follow-up if 
> you prefer.

If we want a hard split between `GlassPlatform` <-> `PlatformUtil`, then 
`PlatformUtil` should not read the `glass.platform` property IMO.

This would affect `getEmbeddedType()` and `isHeadless()`. Since I can not check 
the closed source code, I'm at this point not sure if this is worth to do or 
not.

Personally, I think it's worth clearly separating responsibilities or unifying 
them so that there can't be any weird problems, or something was changed in one 
`Platform` class and forgotten in the other one.

What is weird currently: One can override the `glass.platform` to `windows` and 
`PlatformUtil.isWindows()` can return false, because it checks the `os.name` 
variable.

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

PR Comment: https://git.openjdk.org/jfx/pull/2299#issuecomment-5653281415

Reply via email to