diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b6e08a8..f6bfc095 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ FlatLaf Change Log - UI defaults inspector: Fixed NPE if color of `FlatLineBorder` is null. Also use `FlatLineBorder` line color as cell background color in "Value" column. (PR #1080) + - `FlatDesktop`: Avoid unnecessary logging if desktop is not supported (e.g. + on NixOS with Plasma/KDE desktop). ## 3.7 diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatDesktop.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatDesktop.java index d0d620cb..c5b18371 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatDesktop.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatDesktop.java @@ -43,7 +43,8 @@ public class FlatDesktop public static boolean isSupported( Action action ) { if( SystemInfo.isJava_9_orLater ) { try { - return Desktop.getDesktop().isSupported( Enum.valueOf( Desktop.Action.class, action.name() ) ); + return Desktop.isDesktopSupported() && + Desktop.getDesktop().isSupported( Enum.valueOf( Desktop.Action.class, action.name() ) ); } catch( Exception ex ) { LoggingFacade.INSTANCE.logSevere( null, ex ); return false;