On Mon, 1 Jun 2026 07:41:27 GMT, Sergey Bylokhov <[email protected]> wrote:
>> This fix is supposed to fix the crashes. I think the issues above relate to >> "default headless", which I think we should consider a distinct issue and I >> think the current (new) behaviour on that front is what we should have done >> all along. > >>This fix is supposed to fix the crashes. > > This fix is supposed to fix a regression caused by > https://bugs.openjdk.org/browse/JDK-8185862. So my question was about that > issue. Why did that fix exclude virtual devs from the list of displays? Why > does this patch try to apply changes on top instead of reverting it in the > same way as it was done in JDK17 and JDK21, since it caused so many > regressions with unclear benefits? JDK-8185862 did not try to exclude all virtual displays. It filtered out monitors that AWT cannot use: `EnumDisplayMonitors` may report a monitor, but `CreateDC` fails for it. This can happen for various reasons, but most interesting for us are: 1. [`Session 0`](https://techcommunity.microsoft.com/blog/askperf/application-compatibility---session-0-isolation/372361), when AWT application launched as a windows service. It should be detected as headless. 2. Display transitional states, such as when an RDP connection is established. We want to keep `1.` and fix the crash in the `2.`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31238#discussion_r3335463540
