mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-24 16:40:25 +00:00
Set wmclass name
This commit is contained in:
parent
234048109f
commit
05884660d7
3 changed files with 24 additions and 3 deletions
|
@ -6,11 +6,9 @@ import io.xpipe.app.issue.TrackEvent;
|
|||
import io.xpipe.app.prefs.AppPrefs;
|
||||
import io.xpipe.app.update.XPipeDistributionType;
|
||||
import io.xpipe.app.util.LicenseProvider;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.beans.binding.Bindings;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
|
|
22
app/src/main/java/io/xpipe/app/core/AppPreloader.java
Normal file
22
app/src/main/java/io/xpipe/app/core/AppPreloader.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
package io.xpipe.app.core;
|
||||
|
||||
import io.xpipe.app.issue.TrackEvent;
|
||||
import javafx.application.Preloader;
|
||||
import javafx.stage.Stage;
|
||||
import lombok.Getter;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
@Getter
|
||||
public class AppPreloader extends Preloader {
|
||||
|
||||
@Override
|
||||
@SneakyThrows
|
||||
public void start(Stage primaryStage) {
|
||||
// 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");
|
||||
var m = c.getDeclaredMethod("setName", String.class);
|
||||
m.invoke(c.getMethod("GetApplication").invoke(null), "XPipe");
|
||||
TrackEvent.info("Application preloaded launched");
|
||||
}
|
||||
}
|
|
@ -121,7 +121,8 @@ project.ext {
|
|||
// Disable this for now as it requires Windows 10+
|
||||
// '-XX:+UseZGC',
|
||||
"-Dvisualvm.display.name=XPipe",
|
||||
"-Dapple.awt.application.appearance=system"
|
||||
"-Dapple.awt.application.appearance=system",
|
||||
"-Djavafx.preloader=io.xpipe.app.core.AppPreloader"
|
||||
]
|
||||
useBundledJavaFx = fullVersion
|
||||
useBundledJna = fullVersion
|
||||
|
|
Loading…
Reference in a new issue