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

Gtk: [Linux] scene coordinates are defined incorrectly.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
    • Environment:

      linux 1.8b65

      Description

      Run this code on linux b64 and b65

      package javafxapplication16;

      import com.sun.javafx.runtime.VersionInfo;
      import javafx.application.Application;
      import javafx.event.ActionEvent;
      import javafx.event.EventHandler;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class JavaFXApplication16 extends Application {

          public static void main(String[] args) {
              launch(args);
          }

          @Override
          public void start(final Stage stage) throws Exception {
              final Button b = new Button("Press me");

              VBox vb = new VBox();
              vb.getChildren().addAll(b);
              final Scene scene = new Scene(vb, 300, 300);

              b.setOnAction(new EventHandler<ActionEvent>() {
                  @Override
                  public void handle(ActionEvent t) {
                      System.out.println("X:" + stage.getX() + " Y:" + stage.getY());
                      System.out.println("X:" + scene.getX() + " Y:" + scene.getY());
                  }
              });
              stage.setTitle(VersionInfo.getRuntimeVersion());
              stage.setScene(scene);
              stage.show();
          }
      }


      Output on b64:
      X:808.0 Y:269.0
      X:2.0 Y:23.0

      Output on b65:
      X:808.0 Y:269.0
      X:0.0 Y:0.0

      Look on the second line of output: scene coordinates on b65 don't take decoration into account.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                azvegint Alexander Zvegintsev
                Reporter:
                slugovoy Sergey Lugovoy (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: