Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8160194

[hidpi] Ubuntu 16.04: Screen.getOutputScaleX(), Screen.getOutputScaleY() do not respect user-defined scale

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 9
    • javafx

      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.

            Unassigned Unassigned
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: