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

Invisible cursor or (Cursor.NONE) returns to default Cursor with ALT+ENTER

XMLWordPrintable

      ADDITIONAL SYSTEM INFORMATION :
      Windows 11 + Java 17 + Javafx 22
      and Windows 11 + Java 24 + Javafx 24

      A DESCRIPTION OF THE PROBLEM :
      With an invisible cursor (Cursor.NONE) or an ImageCursor, the cursor returns to the default cursor (the arrow) for a brief moment when ALT+enter keys are pressed (hold down the keys for a more explicit visual effect).

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Run the 'Test Case Code'
      2. The mouse pointer must be inside the application window
      3. Press ALT+ENTER


      ---------- BEGIN SOURCE ----------
      import javafx.application.Application;
      import javafx.scene.Cursor;
      import javafx.scene.Scene;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Stage;
       
      public class Test extends Application {
       
      public static void main(String[] args) {
      Application.launch(args);
      }
       
      @Override
      public void start(Stage primaryStage) throws Exception {
      StackPane root = new StackPane();
      root.setStyle("-fx-background-color:black");
      Scene scene = new Scene(root, 800, 600);
       
      root.setCursor(Cursor.NONE);
       
      primaryStage.setScene(scene);
      primaryStage.show();
      }
       
      }
      ---------- END SOURCE ----------

            kcr Kevin Rushforth
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: