diff --git a/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java b/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java index 276af8ab..7f7b0755 100644 --- a/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java +++ b/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java @@ -9,18 +9,14 @@ import io.xpipe.app.util.PlatformState; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.process.OsType; +import javax.imageio.ImageIO; import java.awt.*; import java.awt.desktop.*; import java.util.List; -import javax.imageio.ImageIO; public class AppDesktopIntegration { public static void setupDesktopIntegrations() { - if (PlatformState.getCurrent() != PlatformState.RUNNING) { - return; - } - try { if (Desktop.isDesktopSupported()) { Desktop.getDesktop().addAppEventListener(new SystemSleepListener() { @@ -49,6 +45,10 @@ public class AppDesktopIntegration { // macOS does not like applications that run fully in the background, so always do it if (OsType.getLocal().equals(OsType.MACOS) && Desktop.isDesktopSupported()) { Desktop.getDesktop().setPreferencesHandler(e -> { + if (PlatformState.getCurrent() != PlatformState.RUNNING) { + return; + } + AppLayoutModel.get().selectSettings(); }); @@ -84,19 +84,6 @@ public class AppDesktopIntegration { } } } - - if (OsType.getLocal().equals(OsType.LINUX) && !GraphicsEnvironment.isHeadless()) { - try { - Toolkit xToolkit = Toolkit.getDefaultToolkit(); - java.lang.reflect.Field awtAppClassNameField = - xToolkit.getClass().getDeclaredField("awtAppClassName"); - awtAppClassNameField.setAccessible(true); - awtAppClassNameField.set(xToolkit, "XPipe"); - } catch (Exception e) { - ErrorEvent.fromThrowable(e).omit().handle(); - } - } - } catch (Throwable ex) { ErrorEvent.fromThrowable(ex).term().handle(); } diff --git a/core/src/main/java/io/xpipe/core/store/ConnectionFileSystem.java b/core/src/main/java/io/xpipe/core/store/ConnectionFileSystem.java index 2cc89660..b27636df 100644 --- a/core/src/main/java/io/xpipe/core/store/ConnectionFileSystem.java +++ b/core/src/main/java/io/xpipe/core/store/ConnectionFileSystem.java @@ -47,7 +47,7 @@ public class ConnectionFileSystem implements FileSystem { if (!shellControl.getTtyState().isPreservesOutput() || !shellControl.getTtyState().isSupportsInput()) { throw new UnsupportedOperationException( - "Shell has a PTY allocated and does not support file system operations"); + "Shell has a PTY allocated and as a result does not support file system operations"); } return this; diff --git a/dist/build.gradle b/dist/build.gradle index e85d4a8d..c09852ab 100644 --- a/dist/build.gradle +++ b/dist/build.gradle @@ -3,7 +3,7 @@ plugins { id 'org.beryx.jlink' version '3.0.1' id "org.asciidoctor.jvm.convert" version "4.0.3" id 'org.jreleaser' version '1.13.1' - id("com.netflix.nebula.ospackage") version "11.9.1" + id("com.netflix.nebula.ospackage") version "11.10.0" id 'org.gradle.crypto.checksum' version '1.4.0' id 'signing' }