Only set wmclass on linux

This commit is contained in:
crschnick 2024-05-09 15:00:21 +00:00
parent 05884660d7
commit 63d9cce78e

View file

@ -1,6 +1,7 @@
package io.xpipe.app.core;
import io.xpipe.app.issue.TrackEvent;
import io.xpipe.core.process.OsType;
import javafx.application.Preloader;
import javafx.stage.Stage;
import lombok.Getter;
@ -12,6 +13,10 @@ public class AppPreloader extends Preloader {
@Override
@SneakyThrows
public void start(Stage primaryStage) {
if (OsType.getLocal() != OsType.LINUX) {
return;
}
// Do it this way to prevent IDE inspections from complaining
var c = Class.forName(
ModuleLayer.boot().findModule("javafx.graphics").orElseThrow(), "com.sun.glass.ui.Application");