mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
FlatDesktop: avoid unnecessary logging if desktop is not supported (e.g. on NixOS with Plasma/KDE desktop)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user