just some echo of JDK-8156981.
JDK9 b123 + Ubuntu 16.04 Linux (Unity) + HiDPI
please run the following code:
import javafx.application.Application;
import javafx.collections.ObservableList;
import javafx.stage.Stage;
import javafx.stage.Screen;
public class ScreenTest extends Application {
@Override
public void start(Stage stage) throws Exception {
ObservableList<Screen> screens = Screen.getScreens();
for (Screen s: screens) {
System.out.println("\n" + s.toString());
System.out.println("dpi: " + s.getDpi());
System.out.println("scale x: " + s.getOutputScaleX());
System.out.println("scale y: " + s.getOutputScaleY());
}
System.exit(0);
}
}
the output for the scales will always be 1 (if GDK_SCALE wasn't set previously). The user-defined scale from "Settings->Display" will be ignored.