Platform preferences theme detection
Christopher Schnick
crschnick at xpipe.io
Sun Feb 11 05:05:23 UTC 2024
Well, that is going to be a fun one to debug ... In my application I
check for a headless environment with
GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices(). If
you call that one before you initialize your application, the
preferences detection does no longer update. So if you augment your
PlatformPreferencesChangedTest application with this main method, it no
longer works. Also, it throws another exception when clicking on the
fail button.
| public static void main(String[] args) {
GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
Application.launch(args);
}|
On 10/02/2024 18:44, Michael Strauß wrote:
> Since I can't reproduce the error on macOS, it's hard to say what
> could be causing it.
>
> If you have the chance, maybe you could run the
> PlatformPreferencesChangedTest application:
> https://github.com/openjdk/jfx/blob/master/tests/manual/events/PlatformPreferencesChangedTest.java
>
> That might rule out that the differences we're seeing have anything to
> do with the way we're using the API.
>
>
> On Sat, Feb 10, 2024 at 6:23 PM Christopher Schnick<crschnick at xpipe.io> wrote:
>> I checked again, restarted everything, but still the same problem:
>>
>> Furthermore, I also tested it on my Asahi Fedora Linux with the latest KDE Plasma. The preferences values there are all detected correctly, but are never updated at runtime when changed in the settings menu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240211/f5de00f3/attachment.htm>
More information about the openjfx-dev
mailing list