On Thu, 22 Feb 2024 14:08:36 GMT, Christoph Langer <clan...@openjdk.org> wrote:
> I think that's hard to find out. At least our regression testing did not show > issues. The change probably needs more testing. On the other hand, I think > the risk with that change is low since the environment that is addressed by > it seems to be rather unusual and the asserts show that something goes wrong > in that case currently anyway. > > > The 2nd thing is that this situation ought to clearly flag that this is a > > HEADLESS situation and the AWT should be in headless mode. And that > > decision usually needs to be made very early. So is this code path involved > > in that decision. It seems likely there's a missing piece since I don't > > know that we even properly make that decision on windows like we do on > > Linux. That seems like a good idea. Definitely worth a shot to see if it is sufficient and in time ! > > That's a valid point. We could flag a system where we detect zero monitors as > headless and then set the headless property. At the moment the default > headless property would be false on Windows in any case, as per > [here](https://github.com/openjdk/jdk/blob/f365d807e5552a6ad9a36afd82db8f0881d62cc3/src/java.desktop/windows/classes/sun/awt/PlatformGraphicsInfo.java#L41). > I guess we can wire the monitor detection in here and return true if no > monitors were found. Would you want me to go that way? ------------- PR Comment: https://git.openjdk.org/jdk/pull/17614#issuecomment-1960237382